Is it possible to set ProGuard to not remove anything from my package? The App size savings are minimal and it breaks my application all together.
Certainly, you can use a broad -keep rule to achieve it like this:
-keep class com.example.package.** { *; }
In case you still want to obfuscate the code that’s part of this package and underlying packages you can use a keep option modifier like this:
-keep,allowobfuscation class com.exmple.package.** { *; }
Alternatively, if you want to get the most out of ProGuard, you can try narrowing down this broad -keep rule so that it will only preserve the necessary classes, methods, etc. to prevent your app from crashing.
2 Likes