~/talk

Exploring Kotlin Symbol Processing: A Practical Guide

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

Builds a small peoplehub app that stores people in a local DB and uses Kotlin Symbol Processing to auto‑generate a DBMapper interface plus an implementation that maps domain and DB data classes, written with KotlinPoet. KSP claims up to two times faster than KAPT, ties each KSP version to a specific Kotlin compiler, forbids in-place code mutation (only generates new files), supports multiplatform with extra Gradle config, and KSP2 is currently in beta.

AI-written summary · about

  1. 0:00Introduction to KSP and the speaker
  2. 1:29What is Kotlin Symbol Processing
  3. 3:15Limitations of KAP and compiler plugins
  4. 5:01Why KSP is a better choice
  5. 6:29Use cases for KSP in development
  6. 7:33Setting up KSP in Gradle
  7. 8:59How KSP models Kotlin code
  8. 11:05Type resolution in KSP
  9. 12:29Limitations of KSP
  10. 13:11Building the PeopleHub demo app
  11. 16:20Project setup for KSP implementation
  12. 17:47Creating the GenerateMapper annotation
  13. 18:52Defining the symbol processor provider
  14. 19:59Implementing the symbol processor
  15. 21:23Verifying KSP setup with logs
  16. 22:24Understanding the resolver in KSP
  17. 23:07Processing annotations with KSP
  18. 24:53Generating code with Kotlin Poet
  19. 26:16Extracting annotation arguments
  20. 27:39Generating mapper interface and class
  21. 29:46Adding functions to generated mappers
  22. 31:33Implementing mapping logic in classes
  23. 32:36Using KSP in multiplatform projects
  24. 33:20Future plans for KSP
  25. 34:25Key takeaways and closing remarks
~/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.