Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,15 @@ subprojects {
mavenCentral()
}

// The toolchain below guarantees compilation with JDK 17 regardless of the
// JVM running Gradle, so no launcher-JVM version check is needed. This keeps
// the build usable as an includeBuild of consumers on newer JDKs.
def javaVersion = JavaVersion.VERSION_17
java {
toolchain {
languageVersion = JavaLanguageVersion.of(javaVersion.toString())
}
}
task enforceVersion {
doLast {
def foundVersion = JavaVersion.current()
if (foundVersion != javaVersion)
throw new IllegalStateException("Wrong Java version; required is "
+ javaVersion + ", but found " + foundVersion)
}
}
compileJava.dependsOn(enforceVersion)

dependencies {
implementation libs.dn.minilog
Expand Down
Loading