Hey i made an Annotation Processor in Java now I w...
# getting-started
b
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
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
Did you mean the plugin? So it es not only annotationprocessor("") in the dependencies?
t
That's right, you need both to apply the
kotlin-kapt
gradle plugin and to add dependency on annotation processors with the
kapt
configuration. https://kotlinlang.org/docs/reference/kapt.html