Member-only story
Kotlin Symbol Processing — Speed up your Android build process
A new build time era for annotation processing with Kotlin has arrived
In a recent post in the android developers blog, written by Ting-Yuan Huang and David Winer, the new Kotlin Symbol Processing (KSP) has officially been announced to be in Alpha state and is compatible with Kotlin version 1.4.30 upwards!
As a reason behind why they build this new compiler plugin, they argue that many developers report build times that are far too long. In addition, it is a problem that there is no native annotation processing system for Kotlin yet and therefore libraries like Android Room for example need to rely on Java annotation processing.
The authors argue that this tool is very similar in terms of its capabilities to the conventional Kotlin Annotation Processing Tool (KAPT) but also up to two times faster. The KSP has therefore the potential to bring you significantly faster build times to your Android projects, that are using Kotlin.
But that’s not all, besides the significantly faster build time, the authors promise direct access to Kotlin compiler features as well as compatibility for multi-platform projects.
If you take a look at the KSP GitHub page you can see that the supported libraries will…