Add jvm target 10 tests on jdk 10

This commit is contained in:
Mikhael Bogdanov
2018-02-16 13:42:21 +01:00
parent 2de0b2a9ef
commit 31c63dea50
4 changed files with 12 additions and 2 deletions
+1
View File
@@ -111,6 +111,7 @@ extra["JDK_16"] = jdkPath("1.6")
extra["JDK_17"] = jdkPath("1.7")
extra["JDK_18"] = jdkPath("1.8")
extra["JDK_9"] = jdkPathIfFound("9")
extra["JDK_10"] = jdkPathIfFound("10")
rootProject.apply {
from(rootProject.file("versions.gradle.kts"))
+1 -1
View File
@@ -9,7 +9,7 @@ import net.rubygrapefruit.platform.WindowsRegistry.Key.HKEY_LOCAL_MACHINE
import org.gradle.internal.os.OperatingSystem
enum class JdkMajorVersion {
JDK_16, JDK_17, JDK_18, JDK_9
JDK_16, JDK_17, JDK_18, JDK_9, JDK_10
}
val jdkAlternativeVarNames = mapOf(JdkMajorVersion.JDK_9 to listOf("JDK_19"))
+5
View File
@@ -180,4 +180,9 @@ codegenTest(target = 9, jvm = 9) {
systemProperty("kotlin.test.substitute.bytecode.1.8.to.1.9", "true")
}
codegenTest(target = 10, jvm = 10) {
systemProperty("kotlin.test.default.jvm.target", "1.8")
systemProperty("kotlin.test.substitute.bytecode.1.8.to.10", "true")
}
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateCompilerTestsKt")
@@ -27,7 +27,11 @@ enum class JvmTarget(override val description: String) : TargetPlatformVersion {
when (this) {
JVM_1_6 -> Opcodes.V1_6
JVM_1_8 ->
if (java.lang.Boolean.valueOf(System.getProperty("kotlin.test.substitute.bytecode.1.8.to.1.9"))) Opcodes.V1_9 else Opcodes.V1_8
when {
java.lang.Boolean.valueOf(System.getProperty("kotlin.test.substitute.bytecode.1.8.to.10")) -> Opcodes.V9 + 1
java.lang.Boolean.valueOf(System.getProperty("kotlin.test.substitute.bytecode.1.8.to.1.9")) -> Opcodes.V9
else -> Opcodes.V1_8
}
}
}