Gradle scripts in Kotlin: is it cool?
summary
Argues that switching Gradle scripts to Kotlin yields static typing, immediate IDE autocomplete and earlier error detection by converting build.gradle to gradle.kts and running the accessorSnapshot task to generate a project schema JSON. Demonstrates converting an Android project end-to-end, replacing Groovy syntactic sugar with explicit calls; build and run succeed after adding an Android-specific workaround (configure<Android>()), but some plugins (notably Gradle Play Publisher) remain incompatible and tooling is still alpha, so partial migration is safer than full rewrite.
AI-written summary · about
chapters (5)
- 0:00Introduction to Gradle DSL
- 10:41Problems with Groovy DSL
- 13:11Kotlin DSL advantages
- 20:37Migration to Kotlin DSL demo
- 31:12Final recommendations and Q&A
related talks
30mKotlin DSL for Android Projects
48mType-Safe Build Logic with Gradle Kotlin DSL
32mMigrate to build.gradle.kts
22mUse Kotlin DSLs for your Gradle scripts
23mUse Kotlin DSLs for Your Gradle Scripts
40mBetter Android Development with Kotlin & Gradle
50mThe Kotlin DSL experience in Gradle
33mGradle with Kotlin
