Reputation: 10290
In IntelliJ you can set the target Java version like this:
Unfortunately I don't see a place where I can do the same for Kotlin. This makes it not possible for me to use Quasar-Kotlin. I want to switch to M14 even though I have 1.0 beta installed. How can I change back?
After changing the build.gradle
file back to M14 I am greeted with compilation errors in my project.
My build.gradle
: https://gist.github.com/Jire/5b517fd767ad498bc18f
Upvotes: 39
Views: 84971
Reputation: 1665
File
-> Settings
-> Build, Execution & Deployment
-> Kotlin Compiler
.
You should get something like in this image, and here you can change the version of Kotlin Compiler
Upvotes: 1
Reputation: 22907
The compiler bundled to Kotlin plugin (IDE) must be greater or equal than external compiler (project) used for building modules. So update Intellij IDEA to be compatible with the most up-to-date plugins.
Help > Check for Updates
Note: If you do not have the most updated version in Language and API version you will not be able to see the latest version of the plugin.
1.3.61
Invalidate Caches & Restart
Observe in Languages & Frameworks > Kotlin that:
You have the latest version of the plugin installed.
1.2
To Latest stable 1.4-M3
(if the Latest stable 1.4-M3
version do not appear, so update the IDE)Finally, check version in Project Settings > Modules > Module SDK > Kotlin SDK: 1.4-M3
I recommend is to synchronize gradle with a non-existent version in order to clean the external libraries. This is because it could happen that our libraries continue to use the old version of the compiler after updating.
1.4-M3
to 1.4.20-M1
plugins {
kotlin("jvm") version "1.4-M3" apply false
}
plugins {
kotlin("jvm") version "X" apply false
}
plugins {
kotlin("jvm") version "1.4.20-M1" apply false
}
GL
Upvotes: 15
Reputation: 5506
Go to Intellij Preferences -> Build, Execution, Deployment -> Kotlin Compiler. Update Language version and Api version to the one you wish.
(You can also use cmd + shift + A and type Kotlin Compiler to get to this preference)
Upvotes: 81
Reputation: 97268
You can't do this at the moment. Building your project in IntelliJ IDEA always uses the version of the Kotlin compiler bundled with the plugin, regardless of what your build.gradle file says. If you need to downgrade to M14, you need to install the M14 version of the plugin.
Upvotes: 12
Reputation: 3234
The kotlin versions are defined in your build.gradle file.
See the following example :
Upvotes: 2