Raise 'kotlin.jvm.target.validation.mode' default value to 'error'.

Now target check intentionally runs always - even when Java sources are
empty. Java part configures publication 'org.gradle.jvm.version'
attribute which affect  published artifact consumers and should be the
same as Kotlin jvmTarget value.

^KT-54993 Fixed
This commit is contained in:
Yahor Berdnikau
2022-11-16 16:57:41 +01:00
committed by Space Team
parent 877e11419e
commit e07e92c945
18 changed files with 148 additions and 77 deletions
+5
View File
@@ -110,6 +110,11 @@ task testJdk6Tests(type: Test) { thisTask ->
})
}
tasks.named("compileModuleTestJava", JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
}
compileModuleTestKotlin {
kotlinJavaToolchain.toolchain.use(JvmToolchain.getToolchainLauncherFor(project, JdkMajorVersion.JDK_9_0))
}