I want to compile my Kotlin program using Kotlin 1.0.4. What are the correct command line options for this purpose? I heard about -version option, but don't understand how to use it. -version 1.0.4 doesn't work.
The command line argument for this purpose is -language-version and its value should be a major.minor Kotlin release version, of which there are only two at the moment: 1.0 and 1.1.
kotlinc -language-version 1.0 source.kt
To make analysis in IntelliJ IDEA be aware of the version the source will be compiled against, you can create a facet (Project Settings -> Facets -> "+") and select the language version in the dropdown there.
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