From 6fccb4e5f96b910755386299be655e5cc4411fea Mon Sep 17 00:00:00 2001 From: Matthew Pope <81593196+popematt@users.noreply.github.com> Date: Thu, 16 May 2024 12:11:11 -0700 Subject: [PATCH] Set Java toolchain for spotbugs task (#863) --- build.gradle.kts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 974dfbf10..98bd83ff6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -375,6 +375,13 @@ tasks { project.gradle.startParameter.excludedTaskNames.add(":spotbugsTest") spotbugsMain { + launcher.set( + project.javaToolchains.launcherFor { + languageVersion.set(JavaLanguageVersion.of(SUPPORTED_JRE_VERSIONS.min())) + vendor.set(JvmVendorSpec.AMAZON) + } + ) + val spotbugsBaselineFile = "$rootDir/config/spotbugs/baseline.xml" val baselining = project.hasProperty("baseline") // e.g. `./gradlew :spotbugsMain -Pbaseline`