Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 0 additions & 25 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,6 @@ plugins {
id("com.diffplug.spotless") version "8.0.0"
}

if (!hasLauncherForJavaVersion(17)) {
throw GradleException(
"JDK 17 is required to build and gradle was unable to detect it on the system. " +
"Please install it and see https://docs.gradle.org/current/userguide/toolchains.html#sec:auto_detection " +
"for details on how gradle detects java toolchains."
)
}
Comment on lines -8 to -14
Copy link
Member Author

@trask trask Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed anymore now that we have the toolchain provisioning enabled it should automatically download and use the right Java version


fun hasLauncherForJavaVersion(version: Int): Boolean {
return try {
javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(version) }.get()
true
} catch (e: Exception) {
false
}
}

spotless {
kotlinGradle {
ktlint().editorConfigOverride(mapOf(
Expand Down Expand Up @@ -68,11 +51,3 @@ dependencies {
implementation("org.owasp:dependency-check-gradle:12.1.8")
implementation("ru.vyarus:gradle-animalsniffer-plugin:2.0.1")
}

// We can't apply conventions to this build so include important ones such as the Java compilation
// target.
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ pluginManagement {
id("org.jsonschema2pojo") version "1.2.2"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("org.graalvm.buildtools.native") version "0.10.6"
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
id("com.gradle.develocity")
id("org.gradle.toolchains.foojay-resolver-convention")
}

dependencyResolutionManagement {
Expand Down
Loading