Hi everyone. I have a question: Kotlin 2 is relea...
# intellij
g
Hi everyone. I have a question: Kotlin 2 is released for quite some time now, but the Kotlin plugin for IntelliJ is still on version number 1.9.20. When is an updated plugin expected? Is it safe to use the “old” plugin with the Kotlin 2 compiler? We use renovate in our project an it really wants to update the kotlin compiler in our maven
pom.xml
files. We are not doing any Compose or KMP-stuff, just plain old JVM backend stuff with Spring Boot. Thank you!
z
They have covered the status of the K2 IntelliJ plugin extensively in K2’s release notes and even released a dedicated blog post recently on the beta status of K2’s plugin. Did you try searching before posting? :)
g
I have seen the blog post and am a bit cautious because of the word “beta”. So I wanted to ask the community.
t
Hi, @Goetz Markgraf! Maybe I didn’t get your question because it isn’t clear what is meant by Kotlin 2 here: K2 mode or K2 compiler. K2 mode is IDE mode written using the K2 compiler.
Is it safe to use the “old” plugin with the Kotlin 2 compiler?
Yes, it is safe, as you can see from the picture in the blog post. However, starting with the Kotlin 2.1 version, new language features will be supported in K2 mode only as well as other K2 mode improvements.
g
Thank you. We are currently using IDEA 2024.2 – that’s beta. However, in our
pom.xml
there is a kotlin compiler plugin. Renovate wants to update that to version 2.0.20:
Copy code
<kotlin.version>2.0.20</kotlin.version>
And I am not sure, if that is a good idea. Since the Kotlin-Plugin in the IDE is still on Version 1.9.20.
t
Yep, it is safe to use the Kotlin language version 2.0.20 with or without K2 mode. It is compatible, except for the newest language features from Kotlin 2.0 or newer.