Hey i made an Annotation Processor in Java now I want to use them also in Kotlin, but the doesnt work. What can I change in the annotationprocessor so that it also works with kotlin?
t
tseisel
12/19/2020, 5:49 PM
Because Kotlin is compiled to JVM bytecode, annotation processors written for Java should properly work for Kotlin without changing anything.
However, Kotlin project should add that processor with
kapt
in Gradle
What's not working for you ?
b
ByFloRedstone
12/19/2020, 6:16 PM
Did you mean the plugin? So it es not only annotationprocessor("") in the dependencies?
t
tseisel
12/19/2020, 11:05 PM
That's right, you need both to apply the
kotlin-kapt
gradle plugin and to add dependency on annotation processors with the