6.0.0-beta.1
Pre-release
Pre-release
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"
}