From 6fd7b2a7f384cb309321590171a024f8e89dd00d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 2 Oct 2018 10:17:56 -0700 Subject: [PATCH] fix proguard for service provider --- scripts/build.sh | 4 ---- scripts/proguard.pro | 11 ++++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index a224a884c..e2f9b01ff 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -11,10 +11,6 @@ echo "-libraryjars '$(java -verbose 2>/dev/null | sed -ne '1 s/\[Opened \(.*\)\] tail api.pro # debug, print out what the previous two commands generated cat api.pro | grep -v "\-keep class baritone.api" > standalone.pro # standalone doesn't keep baritone api -#wget -nv https://www.dropbox.com/s/zmc2l3jnwdvzvak/tempLibraries.zip?dl=1 # i'm sorry -#mv tempLibraries.zip?dl=1 tempLibraries.zip -#unzip tempLibraries.zip - #instead of downloading these jars from my dropbox in a zip, just assume gradle's already got them for us mkdir -p tempLibraries cat ../../scripts/proguard.pro | grep tempLibraries | grep .jar | cut -d "/" -f 2- | cut -d "'" -f -1 | xargs -n1 -I{} bash -c "find ~/.gradle -name {}" | tee /dev/stderr | xargs -n1 -I{} cp {} tempLibraries diff --git a/scripts/proguard.pro b/scripts/proguard.pro index 28120808a..b0f4a5f9e 100644 --- a/scripts/proguard.pro +++ b/scripts/proguard.pro @@ -16,10 +16,8 @@ -flattenpackagehierarchy -repackageclasses 'baritone' -#-keep class baritone.behavior.** { *; } -keep class baritone.api.** { *; } -#-keep class baritone.* { *; } -#-keep class baritone.pathing.goals.** { *; } +-keep class baritone.BaritoneProvider # setting names are reflected from field names, so keep field names -keepclassmembers class baritone.api.Settings { @@ -58,8 +56,15 @@ -libraryjars 'tempLibraries/librarylwjglopenal-20100824.jar' -libraryjars 'tempLibraries/log4j-api-2.8.1.jar' -libraryjars 'tempLibraries/log4j-core-2.8.1.jar' + +# linux / travis -libraryjars 'tempLibraries/lwjgl-2.9.4-nightly-20150209.jar' -libraryjars 'tempLibraries/lwjgl_util-2.9.4-nightly-20150209.jar' + +# mac +#-libraryjars 'tempLibraries/lwjgl_util-2.9.2-nightly-20140822.jar' +#-libraryjars 'tempLibraries/lwjgl-2.9.2-nightly-20140822.jar' + -libraryjars 'tempLibraries/netty-all-4.1.9.Final.jar' -libraryjars 'tempLibraries/oshi-core-1.1.jar' -libraryjars 'tempLibraries/patchy-1.1.jar'