Gradle Kotlin DSL
build.gradle.kts basics.
What is the Gradle Kotlin DSL?
Gradle build scripts can be written in Groovy (build.gradle) or Kotlin (build.gradle.kts). The Kotlin DSL gives you type safety and IDE autocomplete.
Why .kts?
Benefits of the Kotlin DSL:
- Compile-time checking of the build script
- Autocomplete and navigation in the IDE
- Same language as your app code
The tradeoff is slightly slower first-time script compilation.
All lessons in this course
- Gradle Kotlin DSL
- Dependencies and Plugins
- Custom Tasks
- Version Catalogs