Releases: spotbugs/spotbugs-gradle-plugin
6.0.7
6.0.6
6.0.5
6.0.4
6.0.3
6.0.2
6.0.1
6.0.0
6.0.0 (2023-12-02)
BREAKING CHANGES
a. This plugin is now built to Java 11 class file format. It requires Gradle to run on Java 11 or later. (1c1955e)
b. Enable Java Tool Chain support by default (c94b886). To disable it, set useJavaToolchains = false
in the spotbugs
extension.
c. Drop support for Gradle 7.0 (4b0f800). The convention API provides replacement from 7.1 and later, so we use 7.1 as minimal required version.
d. Remove deprecated methods SpotBugsTask.getEnabledReports()
and SpotBugsTask.getFirstEnabledReport
(2ab3c45)
e. The effort
and reportLevel
properties of SpotBugsTask
and SpotBugsExtension
now accept enum values instead of String instances. Read the following notes for detail.
Note for Groovy buildscripts
Groovy buildscripts should use use valueOf(String)
method explicitly for effort
and reportLevel
properties of SpotBugsTask
and SpotBugsExtension
. For example:
// before (v5)
spotbugs {
effort = 'default'
reportLevel = 'default'
}
// after (v6)
spotbugs {
effort = Effort.valueOf('DEFAULT')
reportLevel = Confidence.valueOf('DEFAULT')
}
This limitation is caused by a known issue of the Groovy language.
Note for Kotlin buildscripts
It is recommended to use Gradle 8.2 or later, then you can enjoy the simple property assignment feature by default.
// legacy (Gradle 8.1 and older)
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
spotbugs {
effort.set(Effort.DEFAULT)
reportLevel.set(Confidence.DEFAULT)
}
// new (Gradle 8.2 and later)
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
spotbugs {
effort = Effort.DEFAULT
reportLevel = Confidence.DEFAULT
}
It is also possible to use string values, however, it is not recommended due to lack of type-safety:
// new (Gradle 8.2 and later)
import com.github.spotbugs.snom.assign
spotbugs {
effort = "DEFAULT"
reportLevel = "DEFAULT"
}