Skip to content

Commit 8d12545

Browse files
authored
Update to FG5 and fix refmap build cache bricks (#449)
* fix missing refmap troll in cached builds * comment and move to task config section * forgegradle 5.+ * remove unnecessary shadow alias
1 parent 7b85616 commit 8d12545

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
maven { url = 'https://repo.spongepowered.org/maven/' }
66
}
77
dependencies {
8-
classpath 'net.minecraftforge.gradle:ForgeGradle:4.+'
8+
classpath 'net.minecraftforge.gradle:ForgeGradle:5.+'
99
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
1010
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
1111
}
@@ -25,6 +25,9 @@ group project.modGroup
2525
compileJava {
2626
sourceCompatibility = targetCompatibility = '1.8'
2727
options.encoding = 'UTF-8'
28+
// Disables Gradle build caching for this task
29+
// If build caching is enabled this can cause the refmap to not be built and included
30+
outputs.upToDateWhen { false }
2831
}
2932

3033
compileKotlin.kotlinOptions {
@@ -184,7 +187,8 @@ shadowJar {
184187
configurations = [project.configurations.jarLibs]
185188
relocate 'kotlin', 'com.lambda.shadow.kotlin'
186189
relocate 'kotlinx', 'com.lambda.shadow.kotlinx'
187-
finalizedBy 'reobfShadowJar'
190+
finalizedBy 'configureReobfTaskForReobfShadowJar', 'reobfShadowJar'
191+
mustRunAfter 'jar'
188192
}
189193

190194
reobf {

gradle/wrapper/gradle-wrapper.jar

935 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ set -- \
205205
org.gradle.wrapper.GradleWrapperMain \
206206
"$@"
207207

208+
# Stop when "xargs" is not available.
209+
if ! command -v xargs >/dev/null 2>&1
210+
then
211+
die "xargs is not available"
212+
fi
213+
208214
# Use "xargs" to parse quoted args.
209215
#
210216
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,7 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%
3131

@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
43+
if %ERRORLEVEL% equ 0 goto execute
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7575

7676
:end
7777
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
78+
if %ERRORLEVEL% equ 0 goto mainEnd
7979

8080
:fail
8181
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8282
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
83+
set EXIT_CODE=%ERRORLEVEL%
84+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
85+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
86+
exit /b %EXIT_CODE%
8587

8688
:mainEnd
8789
if "%OS%"=="Windows_NT" endlocal

src/main/java/com/lambda/mixin/MixinMinecraft.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public abstract class MixinMinecraft {
4343
private boolean handActive = false;
4444
private boolean isHittingBlock = false;
4545

46-
@Shadow(aliases = "func_147116_af") // Fixes weird prod meme in some cases??
46+
@Shadow
4747
protected abstract void clickMouse();
4848

4949
@ModifyVariable(method = "displayGuiScreen", at = @At("HEAD"), argsOnly = true)

0 commit comments

Comments
 (0)