~/talk

The Lazy (Meta)programmer's Guide to Hilt Extensions

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [android]
slides:none on file

Claim: replace repetitive Dagger binding modules with one annotation that KSP generates into installable Hilt modules. Uses KSP and KotlinPoet to implement an Autobind symbol processor that emits abstract @Module classes and @Binds methods, and requires annotating the annotation with generatesRootInput so Hilt consistently picks up generated code. At scale this avoids writing ~1,000 boilerplate classes (example: 100 modules × 10 bindings); the extension approach proves feasible and defaults to SingletonComponent.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08Defining meta programming
  3. 3:18Reflection vs code generation
  4. 6:35Laziness and productivity
  5. 11:50Dagger module boilerplate
  6. 16:27Hilt Extensions for chicken-and-egg
  7. 18:12Hilt extension annotation
  8. 20:47KSP plugin for Hilt Extensions
  9. 27:33Q&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.