~/talk

Integrating Kotlin Code into the Gradle Build Process

Talkat droidcon Berlin 2025 · 2025-09-24..09-26· [kotlin, developer-experience]
links:none on file
slides:none on file

Example builds Kotlin source from JSON design tokens, registers a Gradle task that runs before Kotlin compilation and writes files into build/generated/source so the compiler picks them up, optionally moved into a reusable Gradle plugin stored outside buildSrc with an extension for configuration and compatible with the configuration cache. Uses KotlinPoet codegen or string templates, runs a unit contrast ratio test (threshold 3) in CI, powers ~70 BMW apps, and the end‑to‑end flow validates in PRs.

AI-written summary · about

  1. 0:00Introduction
  2. 1:47Automate code generation for themes
  3. 3:40Gradle task in build.gradle
  4. 6:33Improving tasks with buildSrc
  5. 9:29Generate design tokens from JSON
  6. 10:50Validating colors with tests
  7. 12:58BMW theming in production
  8. 14:46Packaging as Gradle plugin
  9. 17:14Code generation libraries
  10. 19:20AI for theme generation
  11. 20:49Summary
~/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.