~/talk

Kotlin DSL for Android Projects

Talkat droidcon London 2019 · 2019-10-24..10-25· [android, kotlin]
links:none on file
slides:none on file

Migrating Android Gradle scripts to Gradle Kotlin DSL gives compile‑time typing so Android Studio shows real code completion, navigation and documentation; migrate by renaming files to .kts, start with settings.gradle.kts, and adapt three syntax rules: double quotes, equals, parentheses. Use a buildSrc Kotlin module to declare reusable dependency objects and a small mapping class that emits configuration entries, turning huge dependency blocks into ~10 lines. Auto‑reload shows sync errors as you type; initial clean builds are noticeably slower—about 3x slower on first build—and CI sees the same hit. Also try the Gradle Kotlin converter for bulk migration.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:30What is Kotlin DSL
  3. 5:22Getting started with Kotlin DSL
  4. 8:10Key syntax differences
  5. 10:38Tips and common errors
  6. 13:11Reloading dependencies
  7. 14:35Adding plugins in Kotlin DSL
  8. 16:23Using gradle tasks for debugging
  9. 17:08Android Studio version recommendations
  10. 18:53Organizing dependencies efficiently
  11. 22:07Creating reusable dependency models
  12. 23:10Extension functions for plugins
  13. 24:13Trade-offs and limitations
  14. 25:58Is migration worth it
  15. 26:39Migrating large projects
  16. 27:41Automated migration tools
  17. 28:23Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.