fix: allow building w/ JDKs beyond Java 17
This commit is contained in:
1 file changed
+14
-1
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`kotlin-dsl`
|
`kotlin-dsl`
|
||||||
`java-gradle-plugin`
|
`java-gradle-plugin`
|
||||||
@@ -26,8 +28,19 @@ dependencies {
|
|||||||
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:2.4.0")
|
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:2.4.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvmToolchain(17)
|
compilerOptions {
|
||||||
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
options.release.set(17)
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
|||||||
Reference in new issue
Block a user