Support 'jvm-target' in CLI
This commit is contained in:
+4
@@ -51,6 +51,10 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
|
|||||||
@Argument(value = "module-name", description = "Module name")
|
@Argument(value = "module-name", description = "Module name")
|
||||||
public String moduleName;
|
public String moduleName;
|
||||||
|
|
||||||
|
@Argument(value = "jvm-target", description = "Compile code to specified JVM target: 1.6 or 1.8. Default one is 1.6.")
|
||||||
|
@ValueDescription("<1.6|1.8>")
|
||||||
|
public String jvmTarget;
|
||||||
|
|
||||||
// Advanced options
|
// Advanced options
|
||||||
@Argument(value = "Xno-call-assertions", description = "Don't generate not-null assertion after each invocation of method returning not-null")
|
@Argument(value = "Xno-call-assertions", description = "Don't generate not-null assertion after each invocation of method returning not-null")
|
||||||
public boolean noCallAssertions;
|
public boolean noCallAssertions;
|
||||||
|
|||||||
@@ -128,6 +128,9 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
|||||||
if (friendPaths != null) {
|
if (friendPaths != null) {
|
||||||
configuration.put(JVMConfigurationKeys.FRIEND_PATHS, friendPaths)
|
configuration.put(JVMConfigurationKeys.FRIEND_PATHS, friendPaths)
|
||||||
}
|
}
|
||||||
|
if ("1.8".equals(arguments.jvmTarget)) {
|
||||||
|
configuration.put(JVMConfigurationKeys.JVM_8_TARGET, true)
|
||||||
|
}
|
||||||
|
|
||||||
putAdvancedOptions(configuration, arguments)
|
putAdvancedOptions(configuration, arguments)
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
@@ -9,6 +9,7 @@ where possible options include:
|
|||||||
-script Evaluate the script file
|
-script Evaluate the script file
|
||||||
-kotlin-home <path> Path to Kotlin compiler home directory, used for runtime libraries discovery
|
-kotlin-home <path> Path to Kotlin compiler home directory, used for runtime libraries discovery
|
||||||
-module-name Module name
|
-module-name Module name
|
||||||
|
-jvm-target <1.6|1.8> Compile code to specified JVM target: 1.6 or 1.8. Default one is 1.6.
|
||||||
-language-version <version> Provide source compatibility with specified language version
|
-language-version <version> Provide source compatibility with specified language version
|
||||||
-nowarn Generate no warnings
|
-nowarn Generate no warnings
|
||||||
-verbose Enable verbose logging output
|
-verbose Enable verbose logging output
|
||||||
|
|||||||
+1
@@ -10,6 +10,7 @@ where possible options include:
|
|||||||
-script Evaluate the script file
|
-script Evaluate the script file
|
||||||
-kotlin-home <path> Path to Kotlin compiler home directory, used for runtime libraries discovery
|
-kotlin-home <path> Path to Kotlin compiler home directory, used for runtime libraries discovery
|
||||||
-module-name Module name
|
-module-name Module name
|
||||||
|
-jvm-target <1.6|1.8> Compile code to specified JVM target: 1.6 or 1.8. Default one is 1.6.
|
||||||
-language-version <version> Provide source compatibility with specified language version
|
-language-version <version> Provide source compatibility with specified language version
|
||||||
-nowarn Generate no warnings
|
-nowarn Generate no warnings
|
||||||
-verbose Enable verbose logging output
|
-verbose Enable verbose logging output
|
||||||
|
|||||||
Reference in New Issue
Block a user