From 62092748ec2db2bb06ba67ec2e5069686f6fae7b Mon Sep 17 00:00:00 2001 From: Matthew Pope Date: Thu, 16 May 2024 11:43:55 -0700 Subject: [PATCH] Set Java toolchain for spotbugs task --- 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`