How it works
Many libraries work by reading annotations in your code and generating the repetitive parts: Room writes the database plumbing for a DAO, Hilt writes the dependency wiring. kapt did this by first generating Java stubs so that Java annotation processors could run, which was slow. KSP, made by Google, reads Kotlin code directly, and Google reports it can be up to twice as fast.
kapt is in maintenance mode, so projects move to KSP by swapping kapt(...) for ksp(...) in the Gradle file once every processor they use supports it. KSP also works in Kotlin Multiplatform, which kapt never did, and Room 3 requires it.
KSP pricing
Related terms
More in Mobile apps
Android building blocks