-
Notifications
You must be signed in to change notification settings - Fork 8
feat(ksp): migrate the Kotlin processor from kapt to KSP #36
Copy link
Copy link
Open
Labels
area:processorAnnotation processor: discovery, validation, META-INF/services generationAnnotation processor: discovery, validation, META-INF/services generationbreaking-changeChange that may break existing setup or workflowsChange that may break existing setup or workflowsstatus:readyTriaged and ready for workTriaged and ready for worktype:featureFeature request or enhancementFeature request or enhancement
Description
Metadata
Metadata
Assignees
Labels
area:processorAnnotation processor: discovery, validation, META-INF/services generationAnnotation processor: discovery, validation, META-INF/services generationbreaking-changeChange that may break existing setup or workflowsChange that may break existing setup or workflowsstatus:readyTriaged and ready for workTriaged and ready for worktype:featureFeature request or enhancementFeature request or enhancement
Problem
The processor is consumed via kapt, which JetBrains has placed in maintenance mode in favor of KSP/KSP2. kapt generates Java stubs for every Kotlin compilation (slow) and is not the recommended path going forward. Offering a KSP implementation would speed up Kotlin consumer builds and future‑proof the tool.
Evidence
README.md:40,53, links to the kapt docsREADME.md:58).org.jetbrains.kotlin.kapt(build.gradle:4,subprojects { apply plugin: 'org.jetbrains.kotlin.kapt' }).javax.annotation.processing.Processor(ServiceSchemeProcessor.kt), which works under kapt/javac but cannot be used by KSP directly.Proposed implementation
SymbolProcessor/SymbolProcessorProviderimplementation (new module, e.g.modules/processor-ksp) that reuses the same contract/provider discovery andMETA-INF/servicesgeneration logic, sharing core code where practical.spi-tooling-processor-ksp) and documentksp(...)wiring in the README alongside (or instead of) kapt.annotationProcessorconsumers.Acceptance criteria
ksp(...)and get identicalMETA-INF/servicesoutput.kotlin-compile-testing's KSP support).annotationProcessor.✅ Triage decision (2026-06-06)
Migrate the Kotlin path off kapt entirely to KSP (kapt is in maintenance mode). KSP becomes the supported Kotlin integration; remove kapt from the build and docs.
SymbolProcessor/SymbolProcessorProvidermirroring the current discovery, validation, andMETA-INF/servicesgeneration.annotationProcessorpath stays for Java consumers (KSP does not process Java sources).kapt(...)→ksp(...). README (docs(readme): fix incorrect Maven coordinates in the Quick Start #22, docs(readme): fix typos and broken links in README and CONTRIBUTING #33), CHANGELOG (docs(changelog): add a CHANGELOG and accurate release docs #34), and the Gradle convention plugin (feat(gradle-plugin): auto-wire SPI tooling via a convention plugin #40) must be updated to KSP. The kapt-specific incremental note in fix(processor): register for Gradle incremental annotation processing #14 applies only to the remaining javax/Java path.