Reputation: 1427
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.
Upvotes: 3
Views: 268
Reputation: 32766
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.
Upvotes: 4