Implementing the Gradle Kotlin DSL
summary
Code and tooling details matter: the Gradle Kotlin DSL is implemented by building on Kotlin scripting and the new type‑inference engine, using multi-stage programming and partial evaluation to preprocess plugin blocks, generate Kotlin accessor stubs for contributed extensions, and update the classpath before compilation. A Kotlin ScriptingHost evaluates scripts against a script definition and a script compilation configuration. The implementation preserves Java parameter names, injects nullability annotations, delivers IDE completion/refactoring/navigation, and succeeds in production as the Gradle Kotlin DSL.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 3:15First commit of Gradle
- 4:12Paying our dues
- 4:32New Keep
- 5:03Scripting
- 5:31Turtle Graphics
- 6:16Commands
- 6:46Turtle Program
- 8:53Writing an App
- 12:48Scripting Experience
- 14:49Kotlin Script Compilation Configuration
- 16:12Executing the Script
- 17:03More Complex Example
- 17:43Project Interface
- 19:00Project Editor
- 19:55Safety
- 20:26Plugins
- 21:18Parameter names
- 23:40Script Configuration
- 25:03Experience
related talks
50mThe Kotlin DSL experience in Gradle
33mGradle with Kotlin
22mUse Kotlin DSLs for your Gradle scripts
23mUse Kotlin DSLs for Your Gradle Scripts
30mKotlin DSL for Android Projects
48mType-Safe Build Logic with Gradle Kotlin DSL
48mKotlin DSL - Let's Express Code in "mini-language"
44mKotlin DSL as a single source of truth for solving many tasks
