Use JDK 17 toolchain and set -Xjdk-release=11
This commit is contained in:
parent
4bc9495f03
commit
0b3688ca5b
1 changed files with 13 additions and 9 deletions
|
@ -1,6 +1,5 @@
|
|||
import com.diffplug.gradle.spotless.SpotlessExtension
|
||||
import net.kyori.indra.licenser.spotless.IndraSpotlessLicenserExtension
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
idea
|
||||
|
@ -11,9 +10,21 @@ java {
|
|||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile::class).configureEach {
|
||||
options.release = 11
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(11))
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
}
|
||||
target {
|
||||
compilations.configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
freeCompilerArgs = listOf("-Xjvm-default=all", "-Xjdk-release=11")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,13 +67,6 @@ testing {
|
|||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
freeCompilerArgs = listOf("-Xjvm-default=all")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
manifest {
|
||||
attributes(
|
||||
|
|
Loading…
Reference in a new issue