Fact or kapt? Build your next annotation processor with KSP
summary
Claims that KSP (Kotlin Symbol Processor) cuts annotation-processing build time by avoids stub generation and lets processors see Kotlin sources directly. Demonstrates a toy processor that finds @InSummable data classes and emits a Kotlin extension summing Int properties, with unit tests passing using kotlin-compile-testing. Implements codegen via KotlinPoet and registers the processor with AutoService. Shows real-world context: Room/Moshi experimental KSP support, planned Dagger/Glide support, and inspection of kapt stubs in the Sunflower project.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:02Hardware Performance Is Improving
- 2:01Json Serialization Benchmark
- 3:42Fail Fast
- 8:33Build Gradle
- 13:26Create a Processor Class
- 13:59Constructor Parameters
- 15:55Get Symbols with Annotation
related talks
46mCodegen with KSP: A Farewell to Stubs
37mWhy you should positively consider introducing and migrating to KSP
36mExploring Kotlin Symbol Processing: A Practical Guide
26mBuild your own compiler with KSP
15mOn the Applicability of Annotation-Based Source Code Modification in Kotlin (Work...
38mKSP and Plugins. Optimizing Kotlin Multiplatform common code
28mMetaprogramming with Kotlin Symbol Processing
25mCode Generation Using Kotlin Symbol Processing (KSP)
