Add JVM target bytecode version 15
#KT-41916 Fixed
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(
|
||||
value = "-jvm-target",
|
||||
valueDescription = "<version>",
|
||||
description = "Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13 or 14), default is 1.6"
|
||||
description = "Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.6"
|
||||
)
|
||||
var jvmTarget: String? by NullableStringFreezableVar(JvmTarget.DEFAULT.description)
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ enum class JvmTarget(override val description: String) : TargetPlatformVersion {
|
||||
JVM_12("12"),
|
||||
JVM_13("13"),
|
||||
JVM_14("14"),
|
||||
JVM_15("15"),
|
||||
;
|
||||
|
||||
val bytecodeVersion: Int by lazy {
|
||||
@@ -40,6 +41,7 @@ enum class JvmTarget(override val description: String) : TargetPlatformVersion {
|
||||
JVM_12 -> Opcodes.V12
|
||||
JVM_13 -> Opcodes.V12 + 1
|
||||
JVM_14 -> Opcodes.V12 + 2
|
||||
JVM_15 -> Opcodes.V12 + 3
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ where possible options include:
|
||||
-include-runtime Include Kotlin runtime into the resulting JAR
|
||||
-java-parameters Generate metadata for Java 1.8 reflection on method parameters
|
||||
-jdk-home <path> Include a custom JDK from the specified location into the classpath instead of the default JAVA_HOME
|
||||
-jvm-target <version> Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13 or 14), default is 1.6
|
||||
-jvm-target <version> Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.6
|
||||
-module-name <name> Name of the generated .kotlin_module file
|
||||
-no-jdk Don't automatically include the Java runtime into the classpath
|
||||
-no-reflect Don't automatically include Kotlin reflection into the classpath
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
error: unknown JVM target version: 1.5
|
||||
Supported versions: 1.6, 1.8, 9, 10, 11, 12, 13, 14
|
||||
Supported versions: 1.6, 1.8, 9, 10, 11, 12, 13, 14, 15
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOption
|
||||
var jdkHome: kotlin.String?
|
||||
|
||||
/**
|
||||
* Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13 or 14), default is 1.6
|
||||
* Possible values: "1.6", "1.8", "9", "10", "11", "12", "13", "14"
|
||||
* Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.6
|
||||
* Possible values: "1.6", "1.8", "9", "10", "11", "12", "13", "14", "15"
|
||||
* Default value: "1.6"
|
||||
*/
|
||||
var jvmTarget: kotlin.String
|
||||
|
||||
Reference in New Issue
Block a user