Skip to content

6.0.0-rc.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 18 Oct 10:46
a90da5b

6.0.0-rc.1 (2023-10-18)

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"
}

Internal Changes

  • Remove the deplicated SpotBugsRunnerForWorker API (aa75fbc)
  • Replace the usage of duplicated project.buildDir API (5abbf2d)
  • Rewrite the implementation into Kotlin (#924) (bcf4706)