Google has rolled out the alpha version of Kotlin Symbol Processing (KSP), an API for building lightweight compiler plug-ins in the Kotlin language.
Similar to the Kapt compiler plug-in for annotation processing, but said to be faster, KSP offers direct access to Kotlin compiler capabilities. Implemented as a compiler plug-in itself, KSP is designed to obscure compiler changes and minimize maintenance efforts.
KSP features an API for directly parsing Kotlin code, to reduce the build speed tax imposed by Kapt stub generation. Kotlin faces a challenge in that it lacks a native annotation processing system, although annotation processors such as Room exist for Kotlin, Google said in a bulletin published on February 10.