Codegen with KSP: A Farewell to Stubs
summary
Claims that Kotlin Symbol Processor (KSP) removes slow Java stub generation so builds get noticeably faster, demonstrates building a toy KSP annotation processor (using kotlinpoet, AutoService and kotlin compiler testing) that emits a per-class sum extension and compiles in the IDE, and shows migration options for legacy kapt processors via X-Processing. Explains that stub generation can consume a large fraction of annotation time and how to make processors incremental using aggregating and isolating modes and farewell to stubs.
AI-written summary · about
chapters (7)
- 0:00KSP at Chicago Roboto
- 1:21Meta programming with KSP
- 8:26Farewell to stubs with KSP
- 15:40Capped slow? KSP helps
- 16:23KSP annotation processor in IDE
- 40:20Aggregating vs isolating KSP outputs
- 44:57Summary
related talks
36mFact or kapt? Build your next annotation processor with KSP
37mWhy you should positively consider introducing and migrating to KSP
47mDealing With KSP in Common Code for Android and iOS
37mGenerating Kotlin Code
09mWorking Around KAPT
43m@Eliminate("Boilerplate")
40mBetter Android Development with Kotlin & Gradle
52mPowered by Kotlin
