It appears that JetBrains is abandoning compatibility with Java annotation processors

I’m a Kotlin user who primarily uses it as a Java replacement in server-side projects. There are many excellent Java tools such as MapStruct, QueryDSL, and more that rely on annotation processors and code generation in order to work. However, using these tools with IntelliJ is complicated, especially when using Maven.

Currently, the kapt tool works well if invoked directly by Maven CLI commands (or the IntelliJ GUI that allows for invoking said CLI commands). However, IntelliJ itself will not properly run kapt as part of its own Kotlin build system. This makes it deeply frustrating to work on a project in Kotlin with annotation processors, as there is no “one click” build step within IntelliJ.

It appears that JetBrains has been ignoring this issue for several years already. What concerns me more is the fact that kapt is in maintenance mode, deprecated in favor of the new KSP tool. While I’m totally fine with the idea of moving to newer and better tools, from what I’ve read about KSP so far it is not compatible with traditional annotation processors (I might be wrong about that, it’s just the impression I have so far). This makes it less likely that JetBrains will resolve the current limitations of kapt, and more likely that they will be moving further away from proper support for Java annotation processors.

As someone who loves using Kotlin instead of Java alongside the broader Java ecosystem, this is very concerning to me. I especially feel it will hinder Kotlin’s adoption in the enterprise space, where Java is still king but a lot of developers (including myself) are slowly increasing Kotlin’s adoption.

I hope I’m misinterpreting what is happening, but I’m deeply upset by this change. I hope that better solutions come forward in the future.

submitted by /u/Droid2Win
[link] [comments]