File tree Expand file tree Collapse file tree 4 files changed +12
-16
lines changed Expand file tree Collapse file tree 4 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ artifactIdGradle=spotless-plugin-gradle
2121
2222# Build requirements
2323VER_JAVA =11
24- VER_SPOTBUGS =4.7.3
2524VER_JSR_305 =3.0.2
2625
2726# Dependencies provided by Spotless plugin
Original file line number Diff line number Diff line change @@ -14,11 +14,14 @@ tasks.withType(JavaCompile).configureEach {
1414// ////////////
1515apply plugin : ' com.github.spotbugs'
1616spotbugs {
17- toolVersion = VER_SPOTBUGS
1817 ignoreFailures = false // bug free or it doesn't ship!
1918 reportLevel = ' medium' // low|medium|high (low = sensitive to even minor mistakes)
2019 omitVisitors = [
21- ' FindReturnRef' ] // https://spotbugs.readthedocs.io/en/latest/detectors.html#findreturnref
20+ // https://spotbugs.readthedocs.io/en/latest/detectors.html#constructorthrow
21+ ' ConstructorThrow' ,
22+ // https://spotbugs.readthedocs.io/en/latest/detectors.html#findreturnref
23+ ' FindReturnRef' ,
24+ ]
2225}
2326tasks. named(' spotbugsTest' ) {
2427 enabled = false
@@ -30,16 +33,10 @@ tasks.withType(com.github.spotbugs.snom.SpotBugsTask).configureEach {
3033 reports {
3134 html. enabled = true
3235 }
33- notCompatibleWithConfigurationCache(" https://github.com/spotbugs/spotbugs-gradle-plugin/issues/670" )
3436}
3537
36- tasks. named(' spotbugsMain' ) {
37- reports {
38- html. enabled = true
39- }
40- }
4138dependencies {
4239 compileOnly ' net.jcip:jcip-annotations:1.0'
43- compileOnly " com.github.spotbugs:spotbugs-annotations:${ VER_SPOTBUGS } "
40+ compileOnly " com.github.spotbugs:spotbugs-annotations:${ spotbugs.toolVersion.get() } "
4441 compileOnly " com.google.code.findbugs:jsr305:${ VER_JSR_305} "
4542}
Original file line number Diff line number Diff line change @@ -56,16 +56,16 @@ for (needsP2 in NEEDS_P2_DEPS) {
5656 add(" ${ needsP2} CompileOnly" , " dev.equo.ide:solstice:${ VER_SOLSTICE} " )
5757 }
5858}
59- jar {
59+
60+ def jar = tasks. named(' jar' , Jar ) {
6061 for (needsP2 in NEEDS_P2_DEPS ) {
61- from sourceSets. getByName (needsP2). output. classesDirs
62+ from sourceSets. named (needsP2). map { it . output. classesDirs }
6263 }
6364}
65+
6466tasks. withType(Test ). configureEach {
6567 dependsOn jar
66- doFirst {
67- classpath + = jar. outputs. files
68- }
68+ classpath + = jar. get(). outputs. files
6969}
7070
7171apply plugin : ' dev.equo.p2deps'
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
1212 // https://github.com/gradle-nexus/publish-plugin/releases
1313 id ' io.github.gradle-nexus.publish-plugin' version ' 1.3.0' apply false
1414 // https://github.com/spotbugs/spotbugs-gradle-plugin/releases
15- id ' com.github.spotbugs' version ' 5.2.1 ' apply false
15+ id ' com.github.spotbugs' version ' 5.2.3 ' apply false
1616 // https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
1717 id ' com.diffplug.spotless-changelog' version ' 3.0.2' apply false
1818 // https://github.com/diffplug/goomph/blob/main/CHANGES.md
You can’t perform that action at this time.
0 commit comments