Releases: spotbugs/spotbugs-gradle-plugin
Releases · spotbugs/spotbugs-gradle-plugin
5.1.3
5.1.3 (2023-08-15)
Bug Fixes
- SpotBugsTask is not configuration cache safe if a stylesheet is set as String for the HTML report (be95ef5) @KengoTODA
6.0.0-beta.3
6.0.0-beta.2
6.0.0-beta.2 (2023-08-14)
Bug Fixes
- remove deprecated methods
SpotBugsTask.getEnabledReports()
andSpotBugsTask.getFirstEnabledReport
(2ab3c45)
Features
BREAKING CHANGES
- The convention API provides replacement from 7.1 and later, so we use 7.1
as minimal required version.
Signed-off-by: Kengo TODA [email protected]
6.0.0-beta.1
6.0.0-beta.1 (2023-08-13)
Features
BREAKING CHANGES
- This plugin has been rewritten in Kotlin, and it may break the binary compatibility of public API. Intentional changes are listed as follows:
Changes for Groovy buildscripts
About effort
and reportLevel
properties of SpotBugsTask
and SpotBugsExtension
, Groovy buildscripts should use use valueOf(String)
method explicitly. This limitation is caused by a known issue of the Groovy language:
// before (v5)
spotbugs {
effort = 'default'
reportLevel = 'default'
}
// after (v6)
spotbugs {
effort = Effort.valueOf('DEFAULT')
reportLevel = Confidence.valueOf('DEFAULT')
}
Changes 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"
}