Skip to content

Releases: xvik/gradle-quality-plugin

6.0.1

03 Sep 15:49

Choose a tag to compare

  • Always add spotbugs-annotations dependency when plugin is available in classpath to
    not break compilation on non-compatible java versions (java 8) or with disabled spotbugs
  • Update checkstyle 11.0.0 -> 11.0.1

6.0.0

26 Aug 17:05

Choose a tag to compare

  • (BREAKING) Drop gradle 7.0 support (7.1 min requirement due to spotbugs plugin)
  • Update checkstyle 10.12.7 -> 11.0.0 (java 21 records support)
    • Add PatternVariableAssignment
    • Add UnnecessaryNullCheckWithInstanceOf
    • Add ConstructorsDeclarationGrouping
    • (BREAKING) Remove checkstyle support for java 8 due to remove of the backport project (including maven central)
      • quality.checkstyleBackport property removed
      • On java 8 checkstyle plugin simply isn't applied
    • (BREAKING) Checkstyle 11.0 requires java 17 and so for java < 17 it would be disabled
      • On java 11 you can manually configure 10.26.1 to enable checkstyle
        (or use new option fallbackToCompatibleToolVersion to downgrade automatically)
  • Update spotbugs 4.8.3 -> 4.9.4 (requires java 11)
    • On java 8 you can manually configure 4.8.6 to enable spotbugs
      (or new option fallbackToCompatibleToolVersion to downgrade automatically)
    • Add quality.spotbugsQuiet = true option which could be used to remove spotbugs warnings
      like "The following classes needed for analysis were missing:"
  • Update pmd 6.55 -> 7.16.0 (java 25 support)
  • Update codenarc 3.4.0 -> 3.6.0
  • Fix CPD plugin compatibility for version 3.5
    • Update default xsl file (for html report)
  • (BREAKING) Spotbugs plugin:
    • Spotbugs plugin 6.x support
    • Spotbugs plugin is not installed automatically anymore: it should be applied manually
      (and quality plugin will configure it as before) because
      • The latest spotbugs plugin (6.x) requires java 11 (direct dependency would drop java 8 support for the entire plugin)
      • For java 8 spotbugs plugin 5.x could be used
    • For multimodule projects it is enough to specify spotbugs plugin in the root project (with "apply false")
    • Custom spotbugs plugin is not used anymore: now extra dependencies cleared from the check task
    • Fix spotbugs exclusions for multiple affected source sets
  • Fix default configs caching on plugin version change
  • Add qualityToolVersions task to show applied tools versions. Could be useful for debug
    because now spotbugs and checkstyle versions depend on a used java version
  • (BREAKING) Quality extension properties are now wrapped with Property:
    • groovy builds must use '=': quality.prop = value
    • kotlin builds might require explicit .set(value)
  • Add quality.fallbackToCompatibleToolVersion option to automatically lower checkstyle
    version for java 11 and spotbugs for java 8. False by default (used for tests)
  • Add quality.animalsniffer option to be able to disable animalsniffer plugin configuration
  • quality.checkstyle and quality.spotbugs by default analyze configured tool versions
    and, if version is compatible with current jvm, enable tool (no need to manually enable tool, just set version)
  • (BREAKING) quality.sourceSets option now accept strings to simplify configuration
    Legacy way with source set objects is available with method: quality.sourceSet(project.sourceSets.main)
  • Fix quality tasks up-to-date check
  • Fix build cache for checkstyle tasks
  • Configuration cache support
    • There is now a separate task copyQualityConfigs actually performing default configs copying
      allowing gradle to properly cache default config files

Migration guide

5.0.0

01 Feb 14:48

Choose a tag to compare

  • (BREAKING) Drop gradle 5 and 6 support
  • Update spotbugs plugin to 5.2.5 (#94)
    • Remove spotbugsShowStackTraces option because it's not used by spotbugs anymore
    • Custom xsl file is not used for html report - native html report generation used instead
    • Add spotbugs-annotations dependency automatically with compileOnly (to simplify @SuppressFBWarnings usage)
      Could be disabled with quality.spotbugsAnnotations = false configuration
  • Update checkstyle 10.6.0 -> 10.12.7 (gradle metadata fix applied)
    • Fix links to checkstyle site (site structure changed)
  • Update spotbugs 4.7.3 -> 4.8.3
  • Update pmd 6.54 -> 6.55 (java 20 support)
  • Update codenarc 3.2.0 -> 3.4.0
  • Remove deprecated gradle apis usage
    • The plugin is still NOT compatible with configuration cache

NOTE: in strict mode (when a quality task fails when violations are found)
a console report may appear NOT STRICTLY BELOW the referenced quality task
(because old gradle api was deprecated and new api does not guarantee
immediate execution after the quality task)

4.9.0

18 Feb 13:21

Choose a tag to compare

  • Gradle 8 support (#77)
  • Update checkstyle 10.3.1 -> 10.6.0
  • Update pmd 6.47 -> 6.54 (java 19 support)
  • Update pmd config:
  • Update spotbugs 4.7.1 -> 4.7.3
  • Update codenarc 3.1.0 -> 3.2.0
  • Fix codenarc for groovy4 support: change to x.x-groovy-4.0 version instead of codenarc-groovy4 artifact

4.8.0

02 Jul 14:14

Choose a tag to compare

  • Update checkstyle 9.1 -> 10.3.1
    IMPORTANT: Checkstyle 10 requires java 11, but plugin will automatically switch to
    backports for lower jre.
    Additional maven repository would be registered if required (LIMITED to checkstyle only)
    Warning in log would clearly indicate when backport is used
  • New option: quality.checkstyleBackport (by default true for jre < 11)
    Option might be used to force backport for java >=11 or to disable backport at all
  • Update checkstyle config:
  • Update pmd 6.34 -> 6.47 (java 17-18 support)
  • Update pmd config:
  • Update codenarc 2.2.0 -> 3.1.0 (groovy 4 support)
  • New option: quality.codenarcGroovy4 (by default, true)
    Since codenarc 3.1 separate groovy4-based codenarc jar produced (codenarc-groovy4)
    It would be used by default because groovy 4 has better adoption for newer JDKs
    (codenarc task started with its own groovy so it does not restrict gradle version)
    If you need to use older codenarc version then switch this option off manually
  • Update spotbugs 4.4.2 -> 4.7.1
  • Update spotbugs plugin 4.7.9 -> 4.8.0

4.7.0

10 Nov 17:21

Choose a tag to compare

  • Fix gradle 7 deprecation warnings (#30)
  • Update spotbugs plugin 4.7.1 -> 4.7.9
    (maven group changed: gradle.plugin.com.github.spotbugs.snom -> com.github.spotbugs.snom)
  • Add spotbugsShowStackTraces option with default to false.
    Option introduced to change the default for spotbug's showStackTraces option
    to avoid additional stacktrace in logs in non-strict mode (when plugin not fails on errors)
  • Update spotbugs 4.2.3 -> 4.4.2
  • Update spotbugs exclusions:
  • Update codenarc 2.1.0 -> 2.2.0
  • Deprecate quality.pmdIncremental property because incremental analysis is enabled by default
    since gradle 6.4 (property only useful for enabling it in gradle 5.6 - 6.3)
  • Update checkstyle 8.42 -> 9.1
  • Update checkstyle config:

4.6.0

01 May 11:32

Choose a tag to compare

  • Fix gradle 7 compatibility (for checkstyle plugin)
  • Fix console output on windows (remove special unicode separator characters, appearing incorrectly)
  • Update checkstyle 8.39 -> 8.42
  • Update checkstyle config:
  • Update pmd 6.31 -> 6.34 (java 16 support)
  • Update pmd config:
  • Update spotbugs 4.2.1 -> 4.2.3
  • Update spotbugs plugin 4.6.0 -> 4.7.1
  • Update codenarc 2.0.0 -> 2.1.0

4.5.0

06 Feb 20:08

Choose a tag to compare

  • Fix report separating lines disappear in intellij IDEA output (appears when gradle output recognized as junit test output).
    Extra zero-width space symbol used to prevent trims.
  • Update checkstyle 8.36.2 -> 8.39 (not 8.40 due to Indentation check regression)
  • Update checkstyle config:
  • Update pmd 6.28 -> 6.31
  • Update pmd config:
  • Update spotbugs 4.1.3 -> 4.2.1
  • Update spotbugs plugin 4.5.1 -> 4.6.0
  • Set checkstyle.configDirectory property: required for ${config_loc} variable (#29)

4.4.0

10 Oct 21:31

Choose a tag to compare

  • Update codenarc 1.5 -> 2.0.0 (groovy 3 and java 14 support, requires java 7)
  • Update codenarc config:
    • Disable new rule ImplicitReturnStatement
      because it will cause too many warnings on typical projects and sometimes don't see existing return
  • Update pmd 6.23 -> 6.28 (java 15 support, text block syntax)
  • Update checkstyle 8.32 -> 8.36.2 (java 14 records support, text block syntax)
  • Update checkstyle config
  • Update spotbugs 4.0.3 -> 4.1.3
  • Update spotbugs plugin 4.1.0 -> 4.5.1
  • Fix exclusions apply for spotbugs (#27)
  • Automatically exclude apt-generated sources for spotbugs
    (apt processor(s) assumed to be specified with annotationProcessor configuration)

4.3.0

13 May 01:27

Choose a tag to compare

  • Update spotbugs plugin to 4.1.0 (#26)
    • Fixes gradle 6.4 compatibility.
    • The new plugin is a re-write of the original spotbugs plugin. But quality plugin
      makes it work as before, so you shouldn't see any difference.
    • Minimal supported gradle is now 5.6 (due to spotbugs plugin)
    • New spotbugs plugin can generate html report itself, but this option is not used
  • Update spotbugs 4.0.2 -> 4.0.3
  • Update checkstyle 8.31 -> 8.32
  • Update checkstyle config:
  • Update pmd 6.22 -> 6.23

NOTE:
* New spotbugs plugin does not support build cache (spotbugs/spotbugs-gradle-plugin#244)
* Spotbugs task always show an exception when violations found (not a problem, just confusing)