~/talk

KSP and Plugins. Optimizing Kotlin Multiplatform common code

Talkat droidcon San Francisco 2022 · 2022-06-02..06-03· [kotlin]
slides:none on file

Demo builds a KSP annotation processor that reads Kotlin AST, generates Kotlin source files for dependency registration, and compiles them into the multiplatform module; it speeds up work vs KAPT but cannot modify existing files and needs generated-source path tweaks. A second piece is an IR-based compiler plugin that injects lazy fields and adds automatic registration by lowering IR; it produces no source artifacts and runs correctly but is harder to implement and relies on an experimental IR backend. Both target Android and iOS.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:08Kotlin Multiplatform overview
  3. 4:40Dependency injection challenges
  4. 7:14Kotlin Symbol Processing basics
  5. 12:35Setting up KSP in project
  6. 16:58Connecting KSP to annotations
  7. 17:20Kotlin compiler plugins overview
  8. 18:28Plugin structure and components
  9. 20:55Transformer for lazy injection
  10. 27:15KSP output and verification
  11. 28:39Automating registration with plugins
  12. 35:04Comparison of KSP and plugins
  13. 36:29Summary and final thoughts
~/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.