Google wants to help make building lightweight compiler plugins in Kotlin easier as well as address some of the challenges developers face with the programming language. For instance, developers have struggled with the language’s lack of a native annotation processing system. To address these issues, the company has announced the alpha version of Kotlin Symbol Processing (KSP).
KSP features similar functionality to Kotlin’s KAPT compiler plugin, but is up to 2x faster and offers direct access to Kotlin compiler features. It is being developed with multi platform compatibility in mind, according to Ting-Yuan Huang, a software engineer and David Winer, a product manager at Android.
“This is the goal of KSP: most Android app developers don’t need to worry about its internals; other than this one line change, a library that supports KSP looks just like a normal annotation processor, only it’s up to 2x faster,” the Android development team wrote in a blog post.
The KSP playground project is available on GitHub and it contains a toy test-processor library that implements the builder pattern as a KSP processor and a workload directory that shows how to use the builder processor in a real-world Kotlin project.
Additionally, JetBrains released Kotlin 1.4.3 this month with a new JVM backend as well as new language and multi-platform features.
The new JVM backend reached beta and it now