https://kotlinlang.org logo
Title
s

Sam

02/24/2019, 4:54 PM
I know there was a plan for compiler plugins for future. As of now, it is possible to have custom annotation applied to kotlin code for java code generation?
d

diesieben07

02/24/2019, 4:56 PM
You can use normal Java annotation processors on your Kotlin code using Kapt. You can even generate Kotlin code. https://kotlinlang.org/docs/reference/kapt.html
s

Sam

02/24/2019, 4:57 PM
Great, thanks
u

Uzi Landsmann

02/24/2019, 5:50 PM
https://github.com/square/kotlinpoet can help you generate kotlin code using kapt
👍 1
s

Sam

02/24/2019, 11:02 PM
Looks like kapt is the actual plugin 🙂 loading these processors
g

gildor

02/25/2019, 2:05 AM
kapt is not actuall a plugin like “compiler plugin”, it’s a separate tool that replaces java apt
s

Sam

02/25/2019, 2:44 PM
oh, i just found that under plugins directory
g

gildor

02/26/2019, 12:00 AM
Actually you are right, kapt also part of compiler plugins, never noticed about this