Can ksp be used as a drop-in replacement for kapt ...
# ksp
s
Can ksp be used as a drop-in replacement for kapt with hibernate-jpamodelgen? When I tried it, no sources were generated.
j
You can’t just replace KAPT with KSP, the processor itself has to support ksp, my suggestion is to reach out to the developer of the processor you are using, to see if they support/plan to support ksp.
a
KSP’s APIs and how it views code is quite different than KAPT. If there is a library with an existing annotation processor that works with KAPT, you won’t be able to run KSP with that existing processor directly due to those differences. In order to use KSP, the library authors would have to convert the existing annotation processor to use KSP’s APIs, or maintain two annotations processors: the existing one that works with KAPT, and a KSP one. Once the library has a KSP processor that functions almost identically to the KAPT processor, then on the consuming side it looks like a drop-in replacement: swap out
kapt
with
ksp
and switch which processor is being used.
today i learned 1
s
I see. So the deprecation message at the top of the kapt doc is really just for compiler plugin authors, which is mildly confusing.
j
it says
maintenance mode
not quite same as deprecation.
s
Fair enough! dev see big red banner scary no read
😂 3
b
sadly 3+ years later, i’m having the same problem with
jpamodelgen
and kapt really is effectively EOL now.
Copy code
> Task :service:kaptGenerateStubsKotlin
w: Kapt currently doesn't support language version 2.0+. Falling back to 1.9.
348 Views