From a88a17a7467abc5e4070f82f0866cc73dd41741d Mon Sep 17 00:00:00 2001 From: Sven Reimers Date: Fri, 29 Sep 2023 13:07:00 +0200 Subject: [PATCH] Disable spotbugs locally --- build.gradle | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index 0df682c9a..2b141f30a 100644 --- a/build.gradle +++ b/build.gradle @@ -337,25 +337,27 @@ allprojects { } // configuring Spotbugs - apply plugin: 'com.github.spotbugs' + if (System.env.CI || project.findProperty('applySpotbugs')) { + apply plugin: 'com.github.spotbugs' - tasks.withType(com.github.spotbugs.snom.SpotBugsTask).configureEach { - // fail build in case a failure was detected - ignoreFailures = false + tasks.withType(com.github.spotbugs.snom.SpotBugsTask).configureEach { + // fail build in case a failure was detected + ignoreFailures = false - jvmArgs.add '--module-path' - jvmArgs.add getJvmModulePath() - jvmArgs.add '--add-modules' - jvmArgs.add getJvmAdditionalModules() + jvmArgs.add '--module-path' + jvmArgs.add getJvmModulePath() + jvmArgs.add '--add-modules' + jvmArgs.add getJvmAdditionalModules() - excludeFilter = rootProject.file('spotbugs-exclude.xml') + excludeFilter = rootProject.file('spotbugs-exclude.xml') - reports { - xml.required.set(false) - html.required.set(true) - } + reports { + xml.required.set(false) + html.required.set(true) + } - auxClassPaths = auxClassPaths + configurations.javafx + configurations.jaxb + auxClassPaths = auxClassPaths + configurations.javafx + configurations.jaxb + } } // configuring Versions plugin