Skip to content

Commit c4511b6

Browse files
authored
SpotBugs plugin 5.2.3 (#1905)
2 parents b9db264 + 1031d15 commit c4511b6

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

gradle.properties

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ artifactIdGradle=spotless-plugin-gradle
2121

2222
# Build requirements
2323
VER_JAVA=11
24-
VER_SPOTBUGS=4.7.3
2524
VER_JSR_305=3.0.2
2625

2726
# Dependencies provided by Spotless plugin

gradle/java-setup.gradle

+6-9
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ tasks.withType(JavaCompile).configureEach {
1414
//////////////
1515
apply plugin: 'com.github.spotbugs'
1616
spotbugs {
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
}
2326
tasks.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-
}
4138
dependencies {
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
}

lib-extra/build.gradle

+5-5
Original file line numberDiff line numberDiff 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+
6466
tasks.withType(Test).configureEach {
6567
dependsOn jar
66-
doFirst {
67-
classpath += jar.outputs.files
68-
}
68+
classpath += jar.get().outputs.files
6969
}
7070

7171
apply plugin: 'dev.equo.p2deps'

settings.gradle

+1-1
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)