Starting from 1.3.70 EAP, there is a new option in
org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
Which is
var useIR: kotlin.Boolean
And which activates
-Xuse-ir
(see https://github.com/JetBrains/kotlin/commit/383239aff62ad353fa5e9a927003d7973e4565be)
This option seems not described in the documentation. What does it do? What are the implications? I notice a decreased build size (in the KB order tho).
Yes. Kotlin is supported as a first-class language on Android.
Go to Intellij Preferences -> Build, Execution, Deployment -> Kotlin Compiler. Update Language version and Api version to the one you wish. This should be the accepted answer.
The Kotlin compiler for JVM compiles Kotlin source files into Java class files. The command-line tools for Kotlin to JVM compilation are kotlinc and kotlinc-jvm . You can also use them for executing Kotlin script files.
The Kotlin daemon: Runs along with the Gradle daemon to compile the project. Runs separately when you compile the project with an IntelliJ IDEA built-in build system.
This option enables the new implementation of the JVM compiler back-end, the part that generates the bytecode for the JVM, in the Kotlin compiler.
As of Kotlin 1.3.71, it's not production-ready yet, and the flag has been added for internal testing, so please don't use it for any real-life projects just yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With