Skip to content

Commit d5907bb

Browse files
committed
Merge upstream/master (keep local README.md)
2 parents db4262b + d567719 commit d5907bb

File tree

12 files changed

+59
-60
lines changed

12 files changed

+59
-60
lines changed

.github/workflows/auto_snapshot_update.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
build-scan-publish: true
5757
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
5858
build-scan-terms-of-use-agree: "yes"
59+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
60+
cache-read-only: ${{ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/1.') }}
5961

6062
- name: Migrate mappings for main source set
6163
run: |

.github/workflows/dependency_graph.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ jobs:
3939
build-scan-publish: true
4040
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
4141
build-scan-terms-of-use-agree: "yes"
42+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

.github/workflows/gradle.yml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ on:
2929
jobs:
3030
build:
3131
runs-on: ubuntu-latest
32-
env:
33-
VIRUSTOTAL_API_KEY: ${{ secrets.VIRUSTOTAL_API_KEY }}
34-
IMGUR_CLIENT_ID: ${{ secrets.IMGUR_CLIENT_ID }}
3532
steps:
3633

3734
- name: Echo distinct ID ${{ inputs.distinct_id }}
@@ -55,30 +52,16 @@ jobs:
5552
build-scan-publish: true
5653
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
5754
build-scan-terms-of-use-agree: "yes"
58-
59-
- name: Compile Java code
60-
run: ./gradlew remapJar --stacktrace --warning-mode=fail
61-
62-
- name: Validate JSON files
63-
run: ./gradlew spotlessJsonCheck || (echo "::error::JSON validation failed! Run './gradlew spotlessApply' to fix style issues, or check the full error message for syntax errors." && exit 1)
64-
65-
- name: Validate Java code style
66-
run: ./gradlew spotlessJavaCheck || (echo "::error::Java code style validation failed! To fix, run 'Clean Up' and then 'Format' in Eclipse, or './gradlew spotlessApply' in the terminal." && exit 1)
67-
68-
- name: Validate license headers
69-
run: ./gradlew spotlessLicenseHeaderCheck || (echo "::error::License headers are missing or malformed in some files! Run './gradlew spotlessApply' to fix this, or check the full error message for details." && exit 1)
70-
71-
- name: Run unit tests
72-
run: ./gradlew test --stacktrace --warning-mode=fail
73-
74-
- name: Validate access widener
75-
run: ./gradlew validateAccessWidener --stacktrace --warning-mode=fail
55+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
56+
cache-read-only: ${{ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/1.') }}
7657

7758
- name: Build
7859
run: ./gradlew build --stacktrace --warning-mode=fail
7960

8061
- name: Upload to VirusTotal for analysis
8162
id: virustotal
63+
env:
64+
VIRUSTOTAL_API_KEY: ${{ secrets.VIRUSTOTAL_API_KEY }}
8265
if: ${{ env.VIRUSTOTAL_API_KEY }}
8366
uses: crazy-max/ghaction-virustotal@v4
8467
with:
@@ -90,7 +73,7 @@ jobs:
9073
continue-on-error: true
9174

9275
- name: Add VirusTotal links to build summary
93-
if: ${{ env.VIRUSTOTAL_API_KEY && steps.virustotal.outputs.analysis }}
76+
if: ${{ steps.virustotal.outputs.analysis }}
9477
run: |
9578
echo "<details open>" >> $GITHUB_STEP_SUMMARY
9679
echo "<summary>🛡️ VirusTotal Scans</summary>" >> $GITHUB_STEP_SUMMARY
@@ -105,20 +88,27 @@ jobs:
10588
echo "</details>" >> $GITHUB_STEP_SUMMARY
10689
10790
- name: Run the mod and take screenshots
108-
uses: GabrielBB/[email protected]
109-
with:
110-
run: ./gradlew runEndToEndTest --stacktrace --warning-mode=fail
91+
# TODO: Migrate to Fabric Client Gametest API so this can run with configuration cache enabled
92+
run: xvfb-run --auto-servernum ./gradlew runEndToEndTest --stacktrace --warning-mode=fail --no-configuration-cache
11193

112-
# Needed because the screenshot gallery won't be created on pull requests.
113-
# Also useful if Imgur uploads fail.
114-
- name: Upload Test Screenshots.zip artifact
94+
- name: Upload screenshots.zip artifact
11595
uses: actions/upload-artifact@v4
116-
if: always()
96+
if: ${{ success() || failure() }}
11797
with:
118-
name: Test Screenshots
98+
name: screenshots
11999
path: run/screenshots
100+
compression-level: 0
101+
102+
- name: Upload crash-reports.zip artifact
103+
uses: actions/upload-artifact@v4
104+
if: ${{ failure() }}
105+
with:
106+
name: crash-reports
107+
path: run/crash-reports
120108

121109
- name: Create test screenshot gallery
110+
env:
111+
IMGUR_CLIENT_ID: ${{ secrets.IMGUR_CLIENT_ID }}
122112
if: ${{ env.IMGUR_CLIENT_ID && (success() || failure()) }}
123113
# Imgur uploads randomly fail sometimes, probably because of the low rate limit.
124114
# TODO: Find a better place to upload the screenshots.

.github/workflows/publish.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ permissions:
3636
jobs:
3737
publish:
3838
runs-on: ubuntu-latest
39-
env:
40-
WI_BACKUPS_API_KEY: ${{ secrets.WI_BACKUPS_API_KEY }}
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4239
steps:
4340

4441
- name: Echo distinct ID ${{ inputs.distinct_id }}
@@ -61,6 +58,12 @@ jobs:
6158

6259
- name: Setup Gradle
6360
uses: gradle/actions/setup-gradle@v4
61+
with:
62+
build-scan-publish: true
63+
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
64+
build-scan-terms-of-use-agree: "yes"
65+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
66+
cache-read-only: ${{ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/1.') }}
6467

6568
- name: Build
6669
run: ./gradlew build --stacktrace --warning-mode=fail
@@ -75,25 +78,29 @@ jobs:
7578
7679
- name: Close milestone
7780
if: ${{ inputs.close_milestone }}
78-
run: ./gradlew closeMilestone --stacktrace
81+
env:
82+
GITHUB_TOKEN: ${{ github.token }}
83+
run: ./gradlew closeMilestone --stacktrace --no-configuration-cache
7984

8085
- name: Upload backups
8186
if: ${{ inputs.upload_backups }}
82-
run: ./gradlew uploadBackups --stacktrace
87+
env:
88+
WI_BACKUPS_API_KEY: ${{ secrets.WI_BACKUPS_API_KEY }}
89+
run: ./gradlew uploadBackups --stacktrace --no-configuration-cache
8390

8491
- name: Publish to GitHub
8592
if: ${{ inputs.publish_github }}
8693
env:
8794
GITHUB_TOKEN: ${{ secrets.OLD_MCX_PUBLISH_TOKEN }}
88-
run: ./gradlew github --stacktrace
95+
run: ./gradlew github --stacktrace --no-configuration-cache
8996

9097
- name: Build website update inputs
9198
id: website_inputs
9299
if: ${{ inputs.update_website }}
93100
run: |
94-
echo "wurst_version=$(grep "^mod_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r' | sed 's/^v//' | sed 's/-MC.*$//')" >> "$GITHUB_OUTPUT"
95-
echo "mc_version=$(grep "^minecraft_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
96-
echo "fapi_version=$(grep "^fabric_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
101+
echo "wurst_version=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r' | sed 's/^v//' | sed 's/-MC.*$//')" >> "$GITHUB_OUTPUT"
102+
echo "mc_version=$(grep '^minecraft_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
103+
echo "fapi_version=$(grep '^fabric_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
97104
98105
- name: Trigger website update
99106
if: ${{ inputs.update_website }}

build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66

77
plugins {
88
id "fabric-loom" version "${loom_version}"
9-
id "com.diffplug.spotless" version "7.2.1"
9+
id "com.diffplug.spotless" version "8.0.0"
1010
}
1111

1212
def ENV = System.getenv()
@@ -59,8 +59,8 @@ dependencies {
5959
// In other words, Wurst won't compile without this library,
6060
// even though it's Minecraft that actually uses it.
6161
modImplementation "com.google.code.findbugs:jsr305:3.0.2"
62-
}
63-
62+
}
63+
6464
loom {
6565
accessWidenerPath = file("src/main/resources/wurst.accesswidener")
6666
}
@@ -111,10 +111,11 @@ tasks.register('runEndToEndTest', JavaExec) {
111111
}
112112

113113
processResources {
114-
inputs.property "version", project.version.substring(1)
114+
def modVersion = project.version.substring(1)
115+
inputs.property("version", modVersion)
115116

116117
filesMatching("fabric.mod.json") {
117-
expand "version": inputs.properties.version
118+
expand(version: modVersion)
118119
}
119120
}
120121

@@ -134,10 +135,11 @@ java {
134135
}
135136

136137
jar {
137-
inputs.property "archivesName", project.base.archivesName
138+
def archivesName = project.base.archivesName
139+
inputs.property("archivesName", archivesName)
138140

139141
from("LICENSE.txt") {
140-
rename { "LICENSE-${inputs.properties.archivesName}.txt" }
142+
rename { "LICENSE-${archivesName}.txt" }
141143
}
142144

143145
exclude("intentionally_untranslated.json")

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Done to increase the memory available to gradle.
22
org.gradle.jvmargs=-Xmx1G
33
org.gradle.parallel=true
4+
org.gradle.configuration-cache=true
45

56
# Fabric Properties
67
# check these at https://fabricmc.net/develop/ and
@@ -14,7 +15,7 @@ loom_version=1.11-SNAPSHOT
1415
fabric_version=0.133.4+1.21.8
1516

1617
# Mod Properties
17-
mod_version=v7.50.1-MC1.21.8
18+
mod_version=v7.50.2-MC1.21.8
1819
maven_group=net.wurstclient
1920
archives_base_name=Wurst-Client
2021
mod_loader=Fabric

gradle/wrapper/gradle-wrapper.jar

1.65 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 4 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.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH="\\\"\\\""
118117

119118

120119
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
172171
# For Cygwin or MSYS, switch paths to Windows format before running java
173172
if "$cygwin" || "$msys" ; then
174173
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
175-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
176174

177175
JAVACMD=$( cygpath --unix "$JAVACMD" )
178176

@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
212210

213211
set -- \
214212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215-
-classpath "$CLASSPATH" \
216213
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217214
"$@"
218215

gradlew.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=
7473

7574

7675
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
76+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7877

7978
:end
8079
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)