Hiya all, trying to figure out how to obfuscate the code.
After some trial and error, I learned:
On (windows)
-
The default path generated for: “${proguard.library.path}”
does not work (I believe this is due to spaces in that path.i.e. Program File/…
Anyways after quoting each path element: i.e. “blah”;“blah”;“blah” -
For some reason “:” gets inserted as path seperator at some points…not sure why, but changing those back to ‘;’ fixed that issue.
-
On the path we also see: build/classes;assets at the end.
Apparently these it cannot resolve, removing them, everything appears to compile/build.
What is the ‘correct’ path for these entries? I tried hardcoding it but that didn’t appear to work either. -
On android, when I launch the game, it looks like none of clicks(taps) are resolving to the correct class/method calls…
My config:
-keep public class com.hpg.pinball.ui.**
-keep public class * implements de.lessvoid.nifty.screen.ScreenController
Where: I believe the 2nd line should preserve both class name and methods (which is what nifty is calling into).
The first line I suspect is redundant (that is the package that contains all my UI/nifty glue).
Any thoughts?
My entire proguard section
[java]
-libraryjars “OMMITTED FOR BREVITY”
-injars ${dist.jar}
-outjars ${dist.jar}.obfuscated.jar
-keep public class com.hpg.pinball.util.PropertiesLoader
-keep public class com.hpg.Metrics
-keepclassmembers class com.hpg.Metrics {
public static ;
}
-keep public class com.hpg.pinball.PinBallMain
-keepclassmembers class com.hpg.pinball.PinBallMain {
public static void setOrientation(int);
}
-keepclassmembers class com.hpg.Metrics {
public static ;
}
-keepclassmembers class .R$ {
public static ;
}
-keep public class com.hpg.pinball.util.StreamLoader
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
-keep public class com.hpg.pinball.ui.*
-keep public class * implements de.lessvoid.nifty.screen.ScreenController
-keep public class * extends com.jme3.app.Application
[/java]