Skip to content

Commit

Permalink
SpotBugs plugin 5.2.3 (#1905)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg authored Nov 27, 2023
2 parents b9db264 + 1031d15 commit c4511b6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ artifactIdGradle=spotless-plugin-gradle

# Build requirements
VER_JAVA=11
VER_SPOTBUGS=4.7.3
VER_JSR_305=3.0.2

# Dependencies provided by Spotless plugin
Expand Down
15 changes: 6 additions & 9 deletions gradle/java-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ tasks.withType(JavaCompile).configureEach {
//////////////
apply plugin: 'com.github.spotbugs'
spotbugs {
toolVersion = VER_SPOTBUGS
ignoreFailures = false // bug free or it doesn't ship!
reportLevel = 'medium' // low|medium|high (low = sensitive to even minor mistakes)
omitVisitors = [
'FindReturnRef'] // https://spotbugs.readthedocs.io/en/latest/detectors.html#findreturnref
// https://spotbugs.readthedocs.io/en/latest/detectors.html#constructorthrow
'ConstructorThrow',
// https://spotbugs.readthedocs.io/en/latest/detectors.html#findreturnref
'FindReturnRef',
]
}
tasks.named('spotbugsTest') {
enabled = false
Expand All @@ -30,16 +33,10 @@ tasks.withType(com.github.spotbugs.snom.SpotBugsTask).configureEach {
reports {
html.enabled = true
}
notCompatibleWithConfigurationCache("https://github.com/spotbugs/spotbugs-gradle-plugin/issues/670")
}

tasks.named('spotbugsMain') {
reports {
html.enabled = true
}
}
dependencies {
compileOnly 'net.jcip:jcip-annotations:1.0'
compileOnly "com.github.spotbugs:spotbugs-annotations:${VER_SPOTBUGS}"
compileOnly "com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}"
compileOnly "com.google.code.findbugs:jsr305:${VER_JSR_305}"
}
10 changes: 5 additions & 5 deletions lib-extra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ for (needsP2 in NEEDS_P2_DEPS) {
add("${needsP2}CompileOnly", "dev.equo.ide:solstice:${VER_SOLSTICE}")
}
}
jar {

def jar = tasks.named('jar', Jar) {
for (needsP2 in NEEDS_P2_DEPS) {
from sourceSets.getByName(needsP2).output.classesDirs
from sourceSets.named(needsP2).map { it.output.classesDirs }
}
}

tasks.withType(Test).configureEach {
dependsOn jar
doFirst {
classpath += jar.outputs.files
}
classpath += jar.get().outputs.files
}

apply plugin: 'dev.equo.p2deps'
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
// https://github.com/gradle-nexus/publish-plugin/releases
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' apply false
// https://github.com/spotbugs/spotbugs-gradle-plugin/releases
id 'com.github.spotbugs' version '5.2.1' apply false
id 'com.github.spotbugs' version '5.2.3' apply false
// https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
id 'com.diffplug.spotless-changelog' version '3.0.2' apply false
// https://github.com/diffplug/goomph/blob/main/CHANGES.md
Expand Down

0 comments on commit c4511b6

Please sign in to comment.