![]() ![]() You just need to add the JetBrains annotations as dependency to Foundation. I hope that better solutions come forward in the future. 3 kangarko, + Quote Reply SimplixSoftworks Hi, this basically tells you that the classes aren't found (maven's annotation processing is strange). I hope I'm misinterpreting what is happening, but I'm deeply upset by this change. 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. We can reference the JetBrains Annotations in two ways: by adding the official JetBrains.Annotations NuGet package to our project, or by adding the annotations to the source code of our project. 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.Īs someone who loves using Kotlin instead of Java alongside the broader Java ecosystem, this is very concerning to me. 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). For the auto-import settings, refer to Build Tools. What concerns me more is the fact that kapt is in maintenance mode, deprecated in favor of the new KSP tool. Importing Last modified: 21 April 2023 Required plugin: Maven ( installed and enabled by default) File Settings Build, Execution, Deployment Build Tools Maven Importing For the information on how to work with Maven projects, refer to Maven projects. It appears that JetBrains has been ignoring this issue for several years already. 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. However, IntelliJ itself will not properly run kapt as part of its own Kotlin build system. INFO +- org.jetbrains:annotations:jar:13.0:compile INFO. However, using these tools with IntelliJ is complicated, especially when using Maven.Ĭurrently, the kapt tool works well if invoked directly by Maven CLI commands (or the IntelliJ GUI that allows for invoking said CLI commands). At compile time, Maven uses the information from the pom.xml file to look up all these. There are many excellent Java tools such as MapStruct, QueryDSL, and more that rely on annotation processors and code generation in order to work. I'm a Kotlin user who primarily uses it as a Java replacement in server-side projects. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |