Annotation processing, gradle?

I’d like to do annotation processing in Kotlin. I found this post, which shows an example using gladle.

- http://blog.jetbrains.com/kotlin/2015/06/better-annotation-processing-supporting-stubs-in-kapt/

I’ve been happily building my projects in IntelliJ, and I have no clue about gradle. Do I need to use it?

I know where the Java annotation processing stuff is in IntelliJ preferences, but I don’t see anything for Kotlin.

thanks,
Rob

At the moment, we only support annotation processing in Gradle. JPS, the make system of IntelliJ IDEA does not support it.

What is your use case?

1 Like

I’m building web apps with Kotlin for server and JS-side. The JS-side code duplicates or can be generated from the server code. For example, if I write a server-side function something could generate the JS-side function with the ajax boilerplate. And some classes that I’m sending back and forth as JSON might not need to be written twice.

I don’t have much experience with annotation processing, but this looked like it might be a good use of it.

1 Like

do you know when the make system of Intellij IDEA will support this? Or is there a ticket for this somewhere that I can watch for progress?

At this time we don’t consider annotation processing support in JPS to be a high-priority feature. What’s your use case? Why can’t you use Gradle to build your project?

I don’t know if there’s a reason for not using Gradle build integration in IntelliJ 16.3 when working on a Gradle project - I didn’t yet switch until to that until today, when I had to in order to use the kotlin-spring & kotlin-jpa plugins.

It would have been nice if it would have been possible if only because the IntelliJ build system seems faster.

However, what if one is using Maven for their builds? I didn’t see a way to delegate all build actions to Maven like is now possible with Gradle.