diff --git a/CHANGELOG.md b/CHANGELOG.md index 9956878..09c2cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ * Gradle 8 support (#77) +* Update checkstyle 10.3.1 -> 10.6.0 +* Update pmd 6.47 -> 6.54 (java 19 support) +* 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 (2022-07-02) * Update checkstyle 9.1 -> 10.3.1 diff --git a/build.gradle b/build.gradle index 17db400..a022190 100644 --- a/build.gradle +++ b/build.gradle @@ -55,10 +55,10 @@ mkdocs { } extras = [ 'version': project.docVersion, - 'checkstyle': '10.3.1', - 'pmd': '6.47.0', - 'spotbugs': '4.7.1', - 'codenarc': '3.1.0', + 'checkstyle': '10.6.0', + 'pmd': '6.54.0', + 'spotbugs': '4.7.3', + 'codenarc': '3.2.0', 'spotbugsPlugin': project.spotbugsPluginVersion, 'cpd': project.cpdVersion, 'animalsnifferPlugin': project.animalsnifferVersion, diff --git a/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityExtension.groovy b/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityExtension.groovy index 1d3c9df..723c62d 100644 --- a/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityExtension.groovy +++ b/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityExtension.groovy @@ -22,10 +22,10 @@ class QualityExtension { sourceSets = [project.sourceSets.main] as Collection } - String checkstyleVersion = '10.3.1' - String pmdVersion = '6.47.0' - String spotbugsVersion = '4.7.1' - String codenarcVersion = '3.1.0' + String checkstyleVersion = '10.6.0' + String pmdVersion = '6.54.0' + String spotbugsVersion = '4.7.3' + String codenarcVersion = '3.2.0' /** * Sets AnimalSniffer version. @@ -96,7 +96,7 @@ class QualityExtension { boolean checkstyleBackport = !JavaVersion.current().java11Compatible /** - * Since codenarc 3.1.0 there is a separate artifact for groovy 4 (CodeNarc-Groovy4). Gradle runs codenarc + * Since codenarc 3.1.0 there is a separate artifact for groovy 4 (CodeNarc-x.x-groovy-4.0). Gradle runs codenarc * task with it's own groovy so by default groovy4 artifact is active. If you need to use earlier codenarc version * then switch this option to false. */ diff --git a/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityPlugin.groovy b/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityPlugin.groovy index c6524bb..2883e90 100644 --- a/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityPlugin.groovy +++ b/src/main/groovy/ru/vyarus/gradle/plugin/quality/QualityPlugin.groovy @@ -65,6 +65,7 @@ import ru.vyarus.gradle.plugin.quality.util.SpotbugsUtils class QualityPlugin implements Plugin { private static final String QUALITY_TASK = 'checkQuality' + private static final String CODENARC_GROOVY4 = '-groovy-4.0' @Override void apply(Project project) { @@ -284,10 +285,10 @@ class QualityPlugin implements Plugin { configFile = configLoader.resolveCodenarcConfig(false) sourceSets = extension.sourceSets } - if (extension.codenarcGroovy4) { + if (extension.codenarcGroovy4 && !extension.codenarcVersion.endsWith(CODENARC_GROOVY4)) { // since codenarc 3.1 different groovy4-based jar could be used dependencies { - codenarc "org.codenarc:CodeNarc-Groovy4:${extension.codenarcVersion}" + codenarc "org.codenarc:CodeNarc:${extension.codenarcVersion}$CODENARC_GROOVY4" } } tasks.withType(CodeNarc).configureEach {