the issue was proguard not knowing what obfuscated minecraft looks like.
Some checks failed
/ Build BaseBand DSM & Broadway (push) Failing after 2m9s

This commit is contained in:
Daniella / Tove 2024-06-11 00:42:21 +02:00
parent be888848c2
commit 710eb72dd8
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
6 changed files with 23 additions and 24 deletions

View file

@ -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

View file

@ -35,7 +35,8 @@
<option name="taskNames">
<list>
<option value="build" />
<option value="Loader:proguard" />
<option value="proguard" />
<option value="proguardRelease" />
</list>
</option>
<option name="vmOptions" />

View file

@ -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"

View file

@ -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 * { *; }

View file

@ -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) {

View file

@ -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