Minor, update JVM target versions in -Xjdk-release help
This commit is contained in:
+2
-2
@@ -75,7 +75,7 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
|||||||
@Argument(
|
@Argument(
|
||||||
value = "-jvm-target",
|
value = "-jvm-target",
|
||||||
valueDescription = "<version>",
|
valueDescription = "<version>",
|
||||||
description = "Target version of the generated JVM bytecode (1.8, 9, 10, ..., 18), default is 1.8"
|
description = "Target version of the generated JVM bytecode (${JvmTarget.SUPPORTED_VERSIONS_DESCRIPTION}), default is 1.8"
|
||||||
)
|
)
|
||||||
var jvmTarget: String? by NullableStringFreezableVar(null)
|
var jvmTarget: String? by NullableStringFreezableVar(null)
|
||||||
|
|
||||||
@@ -378,7 +378,7 @@ default: `indy-with-constants` for JVM target 9 or greater, `inline` otherwise""
|
|||||||
value = "-Xjdk-release",
|
value = "-Xjdk-release",
|
||||||
valueDescription = "<version>",
|
valueDescription = "<version>",
|
||||||
description = """Compile against the specified JDK API version, similarly to javac's `-release`. Requires JDK 9 or newer.
|
description = """Compile against the specified JDK API version, similarly to javac's `-release`. Requires JDK 9 or newer.
|
||||||
Supported versions depend on the used JDK; for JDK 17+ supported versions are 1.8, 9, 10, ..., 17.
|
Supported versions depend on the used JDK; for JDK 17+ supported versions are ${JvmTarget.SUPPORTED_VERSIONS_DESCRIPTION}.
|
||||||
Also sets `-jvm-target` value equal to the selected JDK version"""
|
Also sets `-jvm-target` value equal to the selected JDK version"""
|
||||||
)
|
)
|
||||||
var jdkRelease: String? by NullableStringFreezableVar(null)
|
var jdkRelease: String? by NullableStringFreezableVar(null)
|
||||||
|
|||||||
@@ -58,5 +58,14 @@ enum class JvmTarget(
|
|||||||
|
|
||||||
fun supportedValues(): List<JvmTarget> =
|
fun supportedValues(): List<JvmTarget> =
|
||||||
values().asList() - JVM_1_6
|
values().asList() - JVM_1_6
|
||||||
|
|
||||||
|
const val SUPPORTED_VERSIONS_DESCRIPTION =
|
||||||
|
"1.8, 9, 10, ..., 18"
|
||||||
|
|
||||||
|
init {
|
||||||
|
check(SUPPORTED_VERSIONS_DESCRIPTION == "1.8, 9, 10, ..., ${values().last().description}") {
|
||||||
|
"Please update the value of the constant JvmTarget.SUPPORTED_VERSIONS_DESCRIPTION."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ where advanced options include:
|
|||||||
-Xjava-source-roots=<path> Paths to directories with Java source files
|
-Xjava-source-roots=<path> Paths to directories with Java source files
|
||||||
-Xjavac-arguments=<option[,]> Java compiler arguments
|
-Xjavac-arguments=<option[,]> Java compiler arguments
|
||||||
-Xjdk-release=<version> Compile against the specified JDK API version, similarly to javac's `-release`. Requires JDK 9 or newer.
|
-Xjdk-release=<version> Compile against the specified JDK API version, similarly to javac's `-release`. Requires JDK 9 or newer.
|
||||||
Supported versions depend on the used JDK; for JDK 17+ supported versions are 1.8, 9, 10, ..., 17.
|
Supported versions depend on the used JDK; for JDK 17+ supported versions are 1.8, 9, 10, ..., 18.
|
||||||
Also sets `-jvm-target` value equal to the selected JDK version
|
Also sets `-jvm-target` value equal to the selected JDK version
|
||||||
-Xjspecify-annotations=ignore|strict|warn
|
-Xjspecify-annotations=ignore|strict|warn
|
||||||
Specify behavior for jspecify annotations.
|
Specify behavior for jspecify annotations.
|
||||||
|
|||||||
Reference in New Issue
Block a user