~/talk

Conquer your Compose Navigation with KSP & KotlinPoet in a Multi-Module Project

Talkat droidcon Berlin 2023 · 2023-07-05..07-07· [kotlin, frontend-architecture]
links:none on file
slides:none on file

Payback refactors a 65 feature module app into a single-activity Compose flow using a central navigator and compile-time generation with KSP and KotlinPoet to produce route strings, nav-arg classes, parser functions and Hilt modules. Generated code enforces type-safe routes, supports module-to-module destination resolvers, returns parcelable results via savedStateHandle, and injects args into ViewModels. Four custom KSP processors evolve over a year, cut boilerplate significantly and prevent runtime route/argument errors in production.

AI-written summary · about

  1. 0:00Introduction to navigation improvement
  2. 1:08Talk context and challenges
  3. 2:13Compose navigation basics
  4. 4:19KSP and KotlinPoet explained
  5. 5:45Payback’s Compose navigation issues
  6. 7:50Single activity pattern setup
  7. 9:15Central navigator implementation
  8. 10:44Type safety in navigation
  9. 11:49Auto-generating routes with KSP
  10. 13:35KSP processor implementation steps
  11. 16:23Extracting class information
  12. 17:50Generating code with KotlinPoet
  13. 19:16Improvements over the past year
  14. 19:57Module-to-module navigation
  15. 21:24Returning results from screens
  16. 23:37Injecting args into ViewModels
  17. 25:05Hilt module for argument injection
  18. 25:27Project evolution summary
  19. 25:50Recommendations and takeaways
  20. 26:11Closing 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.