diff --git a/.forgejo/workflows/build-client.yml b/.forgejo/workflows/build-client.yml
index 4b5d165..a7434c7 100644
--- a/.forgejo/workflows/build-client.yml
+++ b/.forgejo/workflows/build-client.yml
@@ -26,7 +26,9 @@ jobs:
run: ./gradlew Client:build
- name: Obfuscate Broadway
if: github.ref == 'refs/heads/release'
- run: bash mobf.sh Client/build/libs/BaseBand-Broadway.jar
+ run: |
+ ./gradlew Client:proguardRelease
+ bash mobf.sh Client/build/proguard/BaseBand-Broadway.jar
- name: Upload DSM
uses: forgejo/upload-artifact@v4
@@ -38,7 +40,7 @@ jobs:
uses: forgejo/upload-artifact@v4
with:
name: BaseBand-Broadway.jar
- path: Client/build/libs/BaseBand-Broadway.jar
+ path: Client/build/proguard/BaseBand-Broadway.jar
- name: Release to server
if: github.ref == 'refs/heads/release'
env:
@@ -47,5 +49,5 @@ jobs:
BB_HOST: ${{ vars.BB_HOST }}
BB_PORT: ${{ vars.BB_PORT }}
BB_PATH: ${{ vars.BB_PATH }}
- run: bash push_file.sh Client/build/libs/BaseBand-Broadway.jar 3849
+ run: bash push_file.sh Client/build/proguard/BaseBand-Broadway.jar 3849
diff --git a/.run/BaseBandRewrite [build-full].run.xml b/.run/BaseBandRewrite [build-full].run.xml
index 3ac213b..9715e06 100644
--- a/.run/BaseBandRewrite [build-full].run.xml
+++ b/.run/BaseBandRewrite [build-full].run.xml
@@ -35,7 +35,8 @@
diff --git a/Client/build.gradle b/Client/build.gradle
index a5711ff..1a414b7 100644
--- a/Client/build.gradle
+++ b/Client/build.gradle
@@ -174,7 +174,11 @@ tasks.register('proguard', ProGuardTask) {
injars jar.archiveFile
outjars "${proguardBuildDir}/BaseBand-${devName}.jar"
libraryjars "${proguardDir}/rt.jar"
- libraryjars configurations.compileClasspath
+ libraryjars configurations.compileClasspath.resolve().collect() {
+ if(it.getName().contains("mapped_stable")) {
+ return new File("build/fg_cache/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860-mci.jar")
+ } else return it;
+ }
dump "${proguardBuildDir}/dump-${devName}.txt"
printmapping "${proguardBuildDir}/mapping-${devName}.txt"
printconfiguration "${proguardBuildDir}/configuration.txt"
@@ -188,7 +192,11 @@ tasks.register('proguardRelease', ProGuardTask) {
injars tasks.releaseJar.archiveFile
outjars "${proguardBuildDir}/BaseBand-${releaseName}.jar"
libraryjars "${proguardDir}/rt.jar"
- libraryjars configurations.compileClasspath
+ libraryjars configurations.compileClasspath.resolve().collect() {
+ if(it.getName().contains("mapped_stable")) {
+ return new File("build/fg_cache/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860-mci.jar")
+ } else return it;
+ }
dump "${proguardBuildDir}/dump-${releaseName}.txt"
printmapping "${proguardBuildDir}/mapping-${releaseName}.txt"
printconfiguration "${proguardBuildDir}/configuration.txt"
diff --git a/Client/proguard/proguard.cfg b/Client/proguard/proguard.cfg
index 091ec76..b1bdf80 100644
--- a/Client/proguard/proguard.cfg
+++ b/Client/proguard/proguard.cfg
@@ -16,8 +16,6 @@
-ignorewarnings
#-overloadaggressively
--keep @interface ** { *; }
-
# keep things meant to exist in prod
-keep class com.baseband.prod.** { *; }
-keep class com.baseband.client.mixin.** { *; }
@@ -29,21 +27,8 @@
}
# jna
--keep class com.sun.** { *; }
--keep class oshi.** { *; }
-
-# spongepowered
--keep class org.** { *; }
-
-#tuddo
--keep class de.** { *; }
-
-# javassist
--keep class javassist.** { *; }
-
-# javassist
--keep class net.** { *; }
+-keep class !com.baseband.**,!de.tudbut.security { *; }
# Also keep - Enumerations. Keep the special static methods that are required in
# enumeration classes.
--keepclassmembers enum ** { *; }
+-keepclassmembers enum * { *; }
diff --git a/Client/src/main/java/com/baseband/client/gui/GuiRewrite.java b/Client/src/main/java/com/baseband/client/gui/GuiRewrite.java
index 7b26d6a..d0ad5ef 100644
--- a/Client/src/main/java/com/baseband/client/gui/GuiRewrite.java
+++ b/Client/src/main/java/com/baseband/client/gui/GuiRewrite.java
@@ -39,6 +39,7 @@ public class GuiRewrite extends GuiScreen {
}
// The initiator; this can, for some reason, not be in the constructor
+ @Override
public void initGui() {
// Minecraft wants this
@@ -86,6 +87,8 @@ public class GuiRewrite extends GuiScreen {
// When ESC is pressed
@Override
public void onGuiClosed() {
+ BaseBand.LOGGER.info("Hiding GUI");
+
super.onGuiClosed();
Features.getFeature(ClickGUI.class).setEnabled(false);
for (Category category : categories) {
diff --git a/push_local.sh b/push_local.sh
index b89924e..c90f94a 100755
--- a/push_local.sh
+++ b/push_local.sh
@@ -10,5 +10,5 @@ if [ "$BB_PATH" = '' ] ; then
fi
bash push_file.sh Server/build/libs/BaseBand-Server.jar
-bash push_file.sh Client/build/libs/BaseBand-Broadway.jar
+bash push_file.sh Client/build/proguard/BaseBand-Broadway.jar
bash push_file.sh Loader/build/proguard/BaseBand-Loader.jar
\ No newline at end of file