Skip to content

Commit

Permalink
build: fix jvm toolchain to 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriankhl committed Dec 7, 2023
1 parent a27a6be commit 662635e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import com.github.benmanes.gradle.versions.reporter.PlainTextReporter
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import java.nio.file.Files
import java.nio.file.StandardCopyOption
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.jvm)
Expand All @@ -23,6 +24,14 @@ allprojects {
}
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = libs.versions.jvmTargetVersion.get()
}

tasks.withType<JavaCompile>().configureEach {
options.release.set(libs.versions.jvmTargetVersion.get().toInt())
}

tasks.withType<DependencyUpdatesTask> {
gradleReleaseChannel = "current"

Expand Down Expand Up @@ -416,3 +425,4 @@ tasks.register("packageAll") {
}
}
}

10 changes: 10 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl-base`
}
Expand All @@ -11,3 +13,11 @@ kotlin {
languageVersion.set(JavaLanguageVersion.of(libs.versions.jdkVersion.get()))
}
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = libs.versions.jvmTargetVersion.get()
}

tasks.withType<JavaCompile>().configureEach {
options.release.set(libs.versions.jvmTargetVersion.get().toInt())
}

0 comments on commit 662635e

Please sign in to comment.