Skip to content

Commit

Permalink
feat(core): Upgrade to Gradle 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Nov 13, 2023
1 parent 163409e commit 78baef2
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 46 deletions.
42 changes: 22 additions & 20 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,48 @@ 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
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
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
29 changes: 17 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -133,26 +131,29 @@ 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.
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
case $MAX_FD in #(
'' | 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
Expand Down Expand Up @@ -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" \
Expand Down
10 changes: 5 additions & 5 deletions plugins/base-gradle-plugin/base-gradle-plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
*/
@NonNullApi
@CacheableTask
public class FunctionalTest extends Test {
public abstract class FunctionalTest extends Test {

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
*/
@NonNullApi
@CacheableTask
public class IntegrationTest extends Test {
public abstract class IntegrationTest extends Test {

}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class PluginPlugin extends AbstractKordampPlugin {
pc.tags = plugin.resolveTags(config)
pc.version = project.version
}

}
}

Expand All @@ -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)
}
}
14 changes: 9 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.*')
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 78baef2

Please sign in to comment.