From d22de613aac3a81feff7323e97b111f043af63ac Mon Sep 17 00:00:00 2001 From: Carsten Otto Date: Fri, 21 Jan 2022 10:07:50 +0100 Subject: [PATCH] define spotbugs outputs for all tasks this fixes the cacheability issue with version 5+ --- .../groovy/lnd-manageJ.java-conventions.gradle | 2 +- .../src/main/groovy/lnd-manageJ.spotbugs.gradle | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle b/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle index a59f6945..f71b1f9e 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle @@ -6,12 +6,12 @@ plugins { id 'lnd-manageJ.tests' id 'lnd-manageJ.mutationtests' id 'lnd-manageJ.integration-tests' - id 'lnd-manageJ.spotbugs' id 'lnd-manageJ.pmd' id 'lnd-manageJ.jacoco' id 'org.springframework.boot' id 'io.spring.dependency-management' id 'java-test-fixtures' + id 'lnd-manageJ.spotbugs' } java { diff --git a/buildSrc/src/main/groovy/lnd-manageJ.spotbugs.gradle b/buildSrc/src/main/groovy/lnd-manageJ.spotbugs.gradle index df0cc915..181f761b 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.spotbugs.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.spotbugs.gradle @@ -2,14 +2,15 @@ plugins { id 'com.github.spotbugs' } -spotbugsMain.reports.configure { - xml.enabled = false - html.enabled = true -} -spotbugsTest.reports.configure { - xml.enabled = false - html.enabled = true +tasks.withType(com.github.spotbugs.snom.SpotBugsTask).forEach { spotbugsTask -> + spotbugsTask.configure { + reports.configure { + xml.enabled = false + html.enabled = true + } + } } + spotbugs { excludeFilter = file("${rootDir}/config/spotbugs-exclude.xml") onlyAnalyze = ['de.cotto.*']