Skip to content

Commit 21369ec

Browse files
committed
Migrate to Gradle 8.7
1 parent 120889b commit 21369ec

File tree

17 files changed

+103
-75
lines changed

17 files changed

+103
-75
lines changed

DynmapCore/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ processResources {
4848
}
4949

5050
jar {
51-
classifier = 'unshaded'
51+
archiveClassifier = 'unshaded'
5252
}
5353

5454
shadowJar {
@@ -79,8 +79,8 @@ shadowJar {
7979
relocate('org.postgresql', 'org.dynmap.org.postgresql')
8080
relocate('io.github.linktosriram.s3lite', 'org.dynmap.s3lite')
8181

82-
destinationDir = file '../target'
83-
classifier = ''
82+
destinationDirectory = file '../target'
83+
archiveClassifier = ''
8484
}
8585

8686
artifacts {

DynmapCoreAPI/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = co
1111
description = "DynmapCoreAPI"
1212

1313
jar {
14-
destinationDir = file '../target'
14+
destinationDirectory = file '../target'
1515
}
1616

1717
artifacts {

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
buildscript {
66
configurations.all {
77
resolutionStrategy {
8-
force("org.ow2.asm:asm:9.3")
9-
force("org.ow2.asm:asm-commons:9.3")
8+
force("org.ow2.asm:asm:9.5")
9+
force("org.ow2.asm:asm-commons:9.5")
1010
}
1111
}
1212
}

dynmap-api/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ dependencies {
1616
}
1717

1818
jar {
19-
classifier = 'unshaded'
19+
archiveClassifier = 'unshaded'
2020
}
2121

2222
shadowJar {
2323
dependencies {
2424
include(dependency(":DynmapCoreAPI"))
2525
}
26-
destinationDir = file '../target'
27-
classifier = ''
26+
destinationDirectory = file '../target'
27+
archiveClassifier = ''
2828
}
2929

3030
artifacts {

forge-1.14.4/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -54,8 +54,9 @@ shadowJar {
5454
dependencies {
5555
include(dependency(':DynmapCore'))
5656
}
57-
archiveName = "Dynmap-${parent.version}-forge-1.14.4.jar"
58-
destinationDir = file '../target'
57+
archiveBaseName = "Dynmap"
58+
archiveClassifier = "forge-1.14.4"
59+
destinationDirectory = file '../target'
5960
}
6061

6162
shadowJar.doLast {
@@ -73,7 +74,7 @@ reobf {
7374

7475
task deobfJar(type: Jar) {
7576
from sourceSets.main.output
76-
classifier = 'dev'
77+
archiveClassifier = 'dev'
7778
}
7879

7980
artifacts {

forge-1.15.2/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -54,8 +54,9 @@ shadowJar {
5454
dependencies {
5555
include(dependency(':DynmapCore'))
5656
}
57-
archiveName = "Dynmap-${parent.version}-forge-1.15.2.jar"
58-
destinationDir = file '../target'
57+
archiveBaseName = "Dynmap"
58+
archiveClassifier = "forge-1.15.2"
59+
destinationDirectory = file '../target'
5960
}
6061

6162
shadowJar.doLast {
@@ -73,7 +74,7 @@ reobf {
7374

7475
task deobfJar(type: Jar) {
7576
from sourceSets.main.output
76-
classifier = 'dev'
77+
archiveClassifier = 'dev'
7778
}
7879

7980
artifacts {

forge-1.16.5/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -56,8 +56,9 @@ shadowJar {
5656
exclude("META-INF/maven/**")
5757
exclude("META-INF/services/**")
5858
}
59-
archiveName = "Dynmap-${parent.version}-forge-1.16.5.jar"
60-
destinationDir = file '../target'
59+
archiveBaseName = "Dynmap"
60+
archiveClassifier = "forge-1.16.5"
61+
destinationDirectory = file '../target'
6162
}
6263

6364
shadowJar.doLast {
@@ -75,7 +76,7 @@ reobf {
7576

7677
task deobfJar(type: Jar) {
7778
from sourceSets.main.output
78-
classifier = 'dev'
79+
archiveClassifier = 'dev'
7980
}
8081

8182
artifacts {

forge-1.17.1/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -60,8 +60,9 @@ shadowJar {
6060
exclude("META-INF/maven/**")
6161
exclude("META-INF/services/**")
6262
}
63-
archiveName = "Dynmap-${parent.version}-forge-1.17.1.jar"
64-
destinationDir = file '../target'
63+
archiveBaseName = "Dynmap"
64+
archiveClassifier = "forge-1.17.1"
65+
destinationDirectory = file '../target'
6566
}
6667

6768
shadowJar.doLast {
@@ -79,7 +80,7 @@ reobf {
7980

8081
task deobfJar(type: Jar) {
8182
from sourceSets.main.output
82-
classifier = 'dev'
83+
archiveClassifier = 'dev'
8384
}
8485

8586
artifacts {

forge-1.18.2/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -63,8 +63,9 @@ shadowJar {
6363
}
6464
relocate('org.apache.commons.codec', 'org.dynmap.forge_1_18_2.commons.codec')
6565

66-
archiveName = "Dynmap-${parent.version}-forge-1.18.2.jar"
67-
destinationDir = file '../target'
66+
archiveBaseName = "Dynmap"
67+
archiveClassifier = "forge-1.18.2"
68+
destinationDirectory = file '../target'
6869
}
6970

7071
shadowJar.doLast {
@@ -82,7 +83,7 @@ reobf {
8283

8384
task deobfJar(type: Jar) {
8485
from sourceSets.main.output
85-
classifier = 'dev'
86+
archiveClassifier = 'dev'
8687
}
8788

8889
artifacts {

forge-1.19.3/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -63,8 +63,9 @@ shadowJar {
6363
}
6464
relocate('org.apache.commons.codec', 'org.dynmap.forge_1_19_3.commons.codec')
6565

66-
archiveName = "Dynmap-${parent.version}-forge-1.19.3.jar"
67-
destinationDir = file '../target'
66+
archiveBaseName = "Dynmap"
67+
archiveClassifier = "forge-1.19.3"
68+
destinationDirectory = file '../target'
6869
}
6970

7071
shadowJar.doLast {
@@ -82,7 +83,7 @@ reobf {
8283

8384
task deobfJar(type: Jar) {
8485
from sourceSets.main.output
85-
classifier = 'dev'
86+
archiveClassifier = 'dev'
8687
}
8788

8889
artifacts {

forge-1.20.2/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -63,8 +63,9 @@ shadowJar {
6363
}
6464
relocate('org.apache.commons.codec', 'org.dynmap.forge_1_20_2.commons.codec')
6565

66-
archiveName = "Dynmap-${parent.version}-forge-1.20.2.jar"
67-
destinationDir = file '../target'
66+
archiveBaseName = "Dynmap"
67+
archiveClassifier = "forge-1.20.2"
68+
destinationDirectory = file '../target'
6869
}
6970

7071
shadowJar.doLast {
@@ -82,7 +83,7 @@ reobf {
8283

8384
task deobfJar(type: Jar) {
8485
from sourceSets.main.output
85-
classifier = 'dev'
86+
archiveClassifier = 'dev'
8687
}
8788

8889
artifacts {

forge-1.20/build.gradle

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.+', changing: true
99
}
1010
}
1111
apply plugin: 'net.minecraftforge.gradle'
@@ -63,8 +63,9 @@ shadowJar {
6363
}
6464
relocate('org.apache.commons.codec', 'org.dynmap.forge_1_20.commons.codec')
6565

66-
archiveName = "Dynmap-${parent.version}-forge-1.20.jar"
67-
destinationDir = file '../target'
66+
archiveBaseName = "Dynmap"
67+
archiveClassifier = "forge-1.20"
68+
destinationDirectory = file '../target'
6869
}
6970

7071
shadowJar.doLast {
@@ -82,7 +83,7 @@ reobf {
8283

8384
task deobfJar(type: Jar) {
8485
from sourceSets.main.output
85-
classifier = 'dev'
86+
archiveClassifier = 'dev'
8687
}
8788

8889
artifacts {

gradle/wrapper/gradle-wrapper.jar

-15.7 KB
Binary file not shown.
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

gradlew

+28-13
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
147+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148+
# shellcheck disable=SC2039,SC3045
146149
MAX_FD=$( ulimit -H -n ) ||
147150
warn "Could not query maximum file descriptor limit"
148151
esac
149152
case $MAX_FD in #(
150153
'' | soft) :;; #(
151154
*)
155+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156+
# shellcheck disable=SC2039,SC3045
152157
ulimit -n "$MAX_FD" ||
153158
warn "Could not set maximum file descriptor limit to $MAX_FD"
154159
esac
@@ -193,18 +198,28 @@ if "$cygwin" || "$msys" ; then
193198
done
194199
fi
195200

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
201210

202211
set -- \
203212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
204213
-classpath "$CLASSPATH" \
205214
org.gradle.wrapper.GradleWrapperMain \
206215
"$@"
207216

217+
# Stop when "xargs" is not available.
218+
if ! command -v xargs >/dev/null 2>&1
219+
then
220+
die "xargs is not available"
221+
fi
222+
208223
# Use "xargs" to parse quoted args.
209224
#
210225
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

0 commit comments

Comments
 (0)