Skip to content

Commit 76c3fae

Browse files
Switch to FG6 fork which supports Gradle 9 (#490)
* Remove Forge maven since mirror is ready * Debug flag * Add artifactural dependency * Update gradle wrapper, fix broken dep * Remove dry run * Add dep in sub project script? * Debug again * Switch to custom group
1 parent e5b987b commit 76c3fae

File tree

13 files changed

+173
-157
lines changed

13 files changed

+173
-157
lines changed

.github/workflows/BuildTest.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,30 @@ jobs:
3939
runs-on: ubuntu-latest
4040

4141
steps:
42-
- uses: actions/checkout@v4.2.2
42+
- uses: actions/checkout@v6.0.0
4343
with:
4444
fetch-tags: true
4545
fetch-depth: 0
4646

4747
- name: Set up JDK 21
48-
uses: actions/setup-java@v4.7.1
48+
uses: actions/setup-java@v5.0.0
4949
with:
5050
java-version: '21'
5151
distribution: 'temurin'
5252

53+
- name: Setup Gradle
54+
uses: gradle/actions/setup-gradle@v5
55+
5356
- name: Get branch name
5457
id: branch-names
55-
uses: tj-actions/branch-names@v9
58+
uses: tj-actions/branch-names@v9.0.2
5659

5760
- name: Fix Gradle permission
5861
run: chmod +x ./gradlew
5962

6063
- name: Setup Forge env
61-
run: ./gradlew setup -Prun_number=${{ github.run_number }}
64+
run: ./gradlew setup -Prun_number=${{ github.run_number }} --info --stacktrace
65+
6266
- name: Stop Gradle daemon
6367
run: ./gradlew --stop
6468

@@ -69,7 +73,7 @@ jobs:
6973
run: echo "CLEANROOM_VERSION=$(cat version.txt)" >> $GITHUB_ENV
7074

7175
- name: setup python
72-
uses: actions/setup-python@v5.6.0
76+
uses: actions/setup-python@v6.1.0
7377
with:
7478
python-version: '3.13'
7579

@@ -85,19 +89,19 @@ jobs:
8589
run: cp script/MMC-Builder/build/CleanroomMMC.zip ./projects/cleanroom/build/libs/Cleanroom-MMC-instance-${{ env.CLEANROOM_VERSION }}.zip
8690

8791
- name: Upload Universal Jar
88-
uses: actions/upload-artifact@v4.6.2
92+
uses: actions/upload-artifact@v5.0.0
8993
with:
9094
name: universal-jar-${{ env.CLEANROOM_VERSION }}
9195
path: projects/cleanroom/build/libs/*-universal.jar
9296

9397
- name: Upload Installer Jar
94-
uses: actions/upload-artifact@v4.6.2
98+
uses: actions/upload-artifact@v5.0.0
9599
with:
96100
name: installer-jar-${{ env.CLEANROOM_VERSION }}
97101
path: projects/cleanroom/build/libs/*-installer.jar
98102

99103
- name: Upload MMC pack zip
100-
uses: actions/upload-artifact@v4.6.2
104+
uses: actions/upload-artifact@v5.0.0
101105
with:
102106
name: mmc-pack-zip-${{ env.CLEANROOM_VERSION }}
103107
path: projects/cleanroom/build/libs/*.zip

.github/workflows/Publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ jobs:
1010
permissions:
1111
contents: write
1212
steps:
13-
- uses: actions/checkout@v4.2.2
13+
- uses: actions/checkout@v6.0.0
1414
with:
1515
fetch-tags: true
1616
fetch-depth: 0
1717

1818
- name: Set up JDK 21
19-
uses: actions/setup-java@v4.7.1
19+
uses: actions/setup-java@v5.0.0
2020
with:
2121
java-version: '21'
2222
distribution: 'temurin'
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v5
2326

2427
- name: Fix Gradle permission
2528
run: chmod +x ./gradlew

.github/workflows/Release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ jobs:
1212
permissions:
1313
contents: write
1414
steps:
15-
- uses: actions/checkout@v4.2.2
15+
- uses: actions/checkout@v6.0.0
1616
with:
1717
fetch-tags: true
1818
fetch-depth: 0
1919

2020
- name: Set up JDK 21
21-
uses: actions/setup-java@v4.7.1
21+
uses: actions/setup-java@v5.0.0
2222
with:
2323
java-version: '21'
2424
distribution: 'temurin'
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v5
2528

2629
- name: Fix Gradle permission
2730
run: chmod +x ./gradlew
@@ -42,7 +45,7 @@ jobs:
4245
run: ./gradlew --stop
4346

4447
- name: setup python
45-
uses: actions/setup-python@v5.6.0
48+
uses: actions/setup-python@v6.1.0
4649
with:
4750
python-version: '3.13'
4851

@@ -65,7 +68,7 @@ jobs:
6568
rm projects/cleanroom/build/libs/cleanroom-${{ env.CLEANROOM_VERSION }}-userdev.jar
6669
rm projects/cleanroom/build/libs/cleanroom-${{ env.CLEANROOM_VERSION }}-userdev-temp.jar
6770
68-
- uses: ncipollo/release-action@v1.14.0
71+
- uses: ncipollo/release-action@v1.20.0
6972
with:
7073
artifacts: "projects/cleanroom/build/libs/*"
7174
generateReleaseNotes: true

build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
buildscript {
22
repositories {
33
mavenLocal()
4-
mavenCentral()
5-
maven {
6-
name "MinecraftForge"
7-
url "https://maven.minecraftforge.net/"
8-
}
94
maven {
10-
name "Outlands"
11-
url "https://maven.outlands.top/releases/"
5+
name = "Outlands"
6+
url = 'https://maven.outlands.top/releases/'
127
}
8+
mavenCentral()
139
}
1410
dependencies {
15-
classpath "net.minecraftforge.gradle:ForgeGradle:6.0.+"
11+
classpath 'top.outlands.gradle:ForgeGradle:6.0.+'
12+
classpath('top.outlands:artifactural:3.0.1') {
13+
transitive = false
14+
}
1615
}
1716
}
1817

buildSrc/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ repositories {
33
}
44

55
dependencies {
6-
implementation 'org.ow2.asm:asm:9.8'
7-
implementation 'org.ow2.asm:asm-tree:9.8'
6+
implementation 'org.ow2.asm:asm:9.9'
7+
implementation 'org.ow2.asm:asm-tree:9.9'
88
}

buildSrc/src/main/groovy/com/cleanroommc/gradle/helpers/tasks/Util.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ class Util {
197197
new Date().iso8601()
198198
}
199199

200-
static def sha1(file) {
200+
static def sha1(File file) {
201201
MessageDigest md = MessageDigest.getInstance('SHA-1')
202-
file.eachByte 4096, { bytes, size ->
202+
file.eachByte 4096, {byte[] bytes, int size ->
203203
md.update(bytes, 0, size)
204204
}
205205
return md.digest().collect {String.format "%02x", it}.join()

gradle/wrapper/gradle-wrapper.jar

-13.9 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
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-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

gradlew

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (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
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +82,11 @@ do
8082
esac
8183
done
8284

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
85+
# This is normally unused
86+
# shellcheck disable=SC2034
8687
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"'
88+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9090

9191
# Use the maximum available, or set MAX_FD != -1 to use that value.
9292
MAX_FD=maximum
@@ -114,7 +114,6 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118117

119118

120119
# Determine the Java command to use to start the JVM.
@@ -133,22 +132,29 @@ location of your Java installation."
133132
fi
134133
else
135134
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.
135+
if ! command -v java >/dev/null 2>&1
136+
then
137+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137138
138139
Please set the JAVA_HOME variable in your environment to match the
139140
location of your Java installation."
141+
fi
140142
fi
141143

142144
# Increase the maximum file descriptors if we can.
143145
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144146
case $MAX_FD in #(
145147
max*)
148+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
149+
# shellcheck disable=SC2039,SC3045
146150
MAX_FD=$( ulimit -H -n ) ||
147151
warn "Could not query maximum file descriptor limit"
148152
esac
149153
case $MAX_FD in #(
150154
'' | soft) :;; #(
151155
*)
156+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
157+
# shellcheck disable=SC2039,SC3045
152158
ulimit -n "$MAX_FD" ||
153159
warn "Could not set maximum file descriptor limit to $MAX_FD"
154160
esac
@@ -165,7 +171,6 @@ fi
165171
# For Cygwin or MSYS, switch paths to Windows format before running java
166172
if "$cygwin" || "$msys" ; then
167173
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169174

170175
JAVACMD=$( cygpath --unix "$JAVACMD" )
171176

@@ -193,18 +198,27 @@ 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, 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" \
204-
-classpath "$CLASSPATH" \
205-
org.gradle.wrapper.GradleWrapperMain \
213+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
206214
"$@"
207215

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

0 commit comments

Comments
 (0)