Build: Use jdk-release compiler option to build kotlin-stdlib

Use JDK11 with `-Xjdk-release=6` for kotlin-stdlib.
Use JDK11 with `-Xjdk-release=7` for kotlin-stdlib-jdk7.
This allows dropping JDK6 and JDK7 from our build completely and remove
`kotlin.build.isObsoleteJdkOverrideEnabled` #KTI-1220.

 #KT-57808
This commit is contained in:
Vyacheslav Gerasimov
2024-03-17 13:41:59 +01:00
committed by Space Team
parent e9d5396fa9
commit 069c920a5c
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -44,9 +44,10 @@ artifacts {
}
compileKotlin {
kotlinJavaToolchain.toolchain.use(JvmToolchain.getToolchainLauncherFor(project, JdkMajorVersion.JDK_1_7))
kotlinJavaToolchain.toolchain.use(JvmToolchain.getToolchainLauncherFor(project, JdkMajorVersion.JDK_11_0))
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.moduleName = project.name
kotlinOptions.freeCompilerArgs = [ "-Xjdk-release=7" ]
}
compileTestKotlin {