diff --git a/gradle.properties b/gradle.properties index 244cfd596..c215a75e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,30 +20,32 @@ group = org.kordamp.gradle sourceCompatibility = 11 targetCompatibility = 11 -asmVersion = 9.4 -checkstyleVersion = 10.9.3 -codenarcVersion = 3.2.0 -commonsCodecVersion = 1.15 -commonsLang3Version = 3.12.0 -errorpronePluginVersion = 3.0.1 -errorproneVersion = 2.16 +asmVersion = 9.6 +checkstyleVersion = 10.12.4 +checkerQualVersion = 3.40.0 +codenarcVersion = 3.3.0 +commonsCodecVersion = 1.16.0 +commonsLang3Version = 3.13.0 +commonsTextVersion = 1.11.0 +errorpronePluginVersion = 3.1.0 +errorproneVersion = 2.23.0 gitPluginVersion = 3.0.0 grgitVersion = 5.0.0 -groovyVersion = 3.0.12 -guavaVersion = 31.1-jre +groovyVersion = 3.0.17 +guavaVersion = 32.1.3-jre httpclientVersion = 4.5.13 httpcoreVersion = 4.4.15 -jacocoVersion = 0.8.8 -jgitVersion = 6.3.0.202209071007-r +jacocoVersion = 0.8.11 +jgitVersion = 6.7.0.202309050840-r jipsyVersion = 1.2.0 junitVersion = 4.13.2 jxrVersion = 3.3.0 kordampBuildVersion = 3.1.0 kordampPluginVersion = 0.51.0 -kotlinVersion = 1.7.20 -mavenResolverVersion = 1.9.0 -mavenSharedVersion = 3.3.3 -mavenVersion = 3.8.6 +kotlinVersion = 1.8.21 +mavenResolverVersion = 1.9.16 +mavenSharedVersion = 3.4.2 +mavenVersion = 3.8.8 mycilaMavenPlugin = 4.1 nemerosaPluginVersion = 3.0.0 osMavenPluginVersion = 1.7.1 @@ -51,15 +53,15 @@ plexusAVersion = 2.1.1 plexusCVersion = 2.6.0 plexusIVersion = 1.26 pmdVersion = 6.55.0 -shadowPluginVersion = 7.1.2 +shadowPluginVersion = 8.1.1 sisuVersion = 0.3.5 -slf4jVersion = 2.0.3 -snakeYamlVersion = 1.33 +slf4jVersion = 2.0.9 +snakeYamlVersion = 2.2 sonarApiVersion = 2.16.3.1081 sonarPluginVersion = 4.0.0.2929 spockVersion = 2.3-groovy-3.0 -spotbugsVersion = 4.7.3 -versionsPluginVersion = 0.46.0 +spotbugsVersion = 4.8.1 +versionsPluginVersion = 0.49.0 org.gradle.daemon = true org.gradle.caching = true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa..7f93135c4 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 508322917..3fa8f862f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d6..1aa94a426 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/plugins/base-gradle-plugin/base-gradle-plugin.gradle b/plugins/base-gradle-plugin/base-gradle-plugin.gradle index d70de461a..a3e53a6f2 100644 --- a/plugins/base-gradle-plugin/base-gradle-plugin.gradle +++ b/plugins/base-gradle-plugin/base-gradle-plugin.gradle @@ -20,11 +20,11 @@ dependencies { implementation "commons-codec:commons-codec:$commonsCodecVersion" // added here so that dependencyUpdates can tell if there are newer versions - compileOnly "net.sourceforge.pmd:pmd:$pmdVersion" - compileOnly "com.github.spotbugs:spotbugs:$spotbugsVersion" - compileOnly "org.jacoco:org.jacoco.core:$jacocoVersion" - compileOnly "org.codenarc:CodeNarc:$codenarcVersion" - compileOnly "com.puppycrawl.tools:checkstyle:$checkstyleVersion" + compileOnly("net.sourceforge.pmd:pmd:$pmdVersion") { transitive = false } + compileOnly("com.github.spotbugs:spotbugs:$spotbugsVersion") { transitive = false } + compileOnly("org.jacoco:org.jacoco.core:$jacocoVersion") { transitive = false } + compileOnly("org.codenarc:CodeNarc:$codenarcVersion") { transitive = false } + compileOnly("com.puppycrawl.tools:checkstyle:$checkstyleVersion") { transitive = false } } processResources { diff --git a/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/FunctionalTest.java b/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/FunctionalTest.java index a76cba41b..c5a0af45b 100644 --- a/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/FunctionalTest.java +++ b/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/FunctionalTest.java @@ -27,5 +27,6 @@ */ @NonNullApi @CacheableTask -public class FunctionalTest extends Test { +public abstract class FunctionalTest extends Test { + } diff --git a/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/IntegrationTest.java b/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/IntegrationTest.java index c7363ada5..763be94f4 100644 --- a/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/IntegrationTest.java +++ b/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/test/tasks/IntegrationTest.java @@ -27,5 +27,6 @@ */ @NonNullApi @CacheableTask -public class IntegrationTest extends Test { +public abstract class IntegrationTest extends Test { + } diff --git a/plugins/java-project-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/project/java/tasks/JavaExecSettingsTask.groovy b/plugins/java-project-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/project/java/tasks/JavaExecSettingsTask.groovy index 6ff2a50da..200765491 100644 --- a/plugins/java-project-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/project/java/tasks/JavaExecSettingsTask.groovy +++ b/plugins/java-project-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/project/java/tasks/JavaExecSettingsTask.groovy @@ -93,7 +93,8 @@ class JavaExecSettingsTask extends AbstractReportingTask { private void printTask(JavaExec task) { print(task.name + ':', 0) - doPrintMapEntry('main', task.main, 1) + doPrintMapEntry('mainClass', task.mainClass, 1) + doPrintMapEntry('mainModule', task.mainModule, 1) doPrintMapEntry('executable', task.executable, 1) doPrintMapEntry('minHeapSize', task.minHeapSize, 1) doPrintMapEntry('maxHeapSize', task.maxHeapSize, 1) diff --git a/plugins/plugin-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/plugin/PluginPlugin.groovy b/plugins/plugin-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/plugin/PluginPlugin.groovy index 1b97c8e02..e051fd54d 100644 --- a/plugins/plugin-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/plugin/PluginPlugin.groovy +++ b/plugins/plugin-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/plugin/PluginPlugin.groovy @@ -154,6 +154,7 @@ class PluginPlugin extends AbstractKordampPlugin { pc.tags = plugin.resolveTags(config) pc.version = project.version } + } } @@ -173,5 +174,11 @@ class PluginPlugin extends AbstractKordampPlugin { } PublishingUtils.configureSigning(config, project, 'pluginMaven') + def copyDocFiles = project.tasks.findByName('copyDocFiles') + def publishPluginJavaDocsJar = project.tasks.findByName('publishPluginJavaDocsJar') + if (publishPluginJavaDocsJar && copyDocFiles) publishPluginJavaDocsJar.dependsOn(copyDocFiles) + def publishPluginJar = project.tasks.findByName('publishPluginJar') + def generateMetadataFileForPluginMavenPublication = project.tasks.findByName('generateMetadataFileForPluginMavenPublication') + if (generateMetadataFileForPluginMavenPublication && publishPluginJar) generateMetadataFileForPluginMavenPublication.dependsOn(publishPluginJar) } } diff --git a/settings.gradle b/settings.gradle index 397693418..dd2bc6330 100644 --- a/settings.gradle +++ b/settings.gradle @@ -22,7 +22,7 @@ buildscript { gradlePluginPortal() } dependencies { - classpath "gradle.plugin.com.github.johnrengelman:shadow:$shadowPluginVersion" + classpath "com.github.johnrengelman:shadow:$shadowPluginVersion" classpath "org.ajoberstar:gradle-git-publish:$gitPluginVersion" classpath "org.kordamp.gradle:groovy-project-gradle-plugin:$kordampPluginVersion" classpath "org.kordamp.gradle:plugin-gradle-plugin:$kordampPluginVersion" @@ -64,6 +64,7 @@ enforce { r.ignore('com.sun.jna.*') r.ignore('com.mycila.*') r.ignore('org.xmlpull.*') + r.ignore('org.apache.commons.logging.*') //r.ignore('org.cyberneko.*') //r.ignore('org.apache.xerces.*') //r.ignore('org.apache.maven.*') @@ -81,7 +82,7 @@ enforce { rule(enforcer.rules.ForceDependencies) { r -> r.dependencies.addAll "com.google.code.findbugs:jsr305:3.0.2", - "com.google.code.gson:gson:2.8.5", + "com.google.code.gson:gson:2.8.9", "com.google.guava:guava:$guavaVersion", "com.mycila:license-maven-plugin:$mycilaMavenPlugin", "com.squareup.okio:okio:2.10.0", @@ -96,6 +97,7 @@ enforce { "net.sf.saxon:Saxon-HE:9.9.1-7", "org.ajoberstar.grgit:grgit-core:$grgitVersion", "org.apache.commons:commons-lang3:3.10", + "org.apache.commons:commons-text:$commonsTextVersion", "org.apache.httpcomponents:httpclient:$httpclientVersion", "org.apache.httpcomponents:httpclient:$httpclientVersion", "org.apache.httpcomponents:httpcore:$httpcoreVersion", @@ -117,9 +119,10 @@ enforce { "org.apache.maven:maven-resolver-provider:$mavenVersion", "org.apache.maven:maven-settings-builder:$mavenVersion", "org.apache.maven:maven-settings:$mavenVersion", - "org.assertj:assertj-core:3.19.0", - "org.bouncycastle:bcpkix-jdk15on:1.64", - "org.bouncycastle:bcprov-jdk15on:1.64", + "org.assertj:assertj-core:3.24.2", + "org.bouncycastle:bcpkix-jdk15on:1.70", + "org.bouncycastle:bcprov-jdk15on:1.70", + "org.checkerframework:checker-qual:$checkerQualVersion", "org.codehaus.groovy.modules.http-builder:http-builder:0.7.2", "org.codehaus.groovy:groovy:$groovyVersion", "org.codehaus.plexus:plexus-classworlds:$plexusCVersion", @@ -131,6 +134,7 @@ enforce { "org.eclipse.sisu:org.eclipse.sisu.plexus:$sisuVersion", "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion", "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion", "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", "org.junit.platform:junit-platform-launcher:1.7.2", "org.ow2.asm:asm-analysis:$asmVersion",