https://kotlinlang.org logo
#getting-started
Title
# getting-started
c

Chrys

11/06/2023, 2:43 PM
numb question: why is the genrated class of kapt annotation processor a java class instead of kotlin?
c

Casey Brooks

11/06/2023, 6:10 PM
Kapt is basically just a bridge to the Java compiler’s APT. It creates Java stubs from Kotlin code, so that a Java annotation processor can run. Since APT is part of the Java compiler toolchain, a KAPT processor generates Java code. KSP is the alternative for inspecting/generating Kotlin source code. But not all annotation processors work with KSP