Search code examples
androidproguardobfuscation

Prevent files inside folder name "model" from proguard obfuscation


I have many modules in project containing different paths for model(pojo classes) folder. Can i use below line in proguard file to keep all classes containing "model" in class path?

-keep class **.model.**{
*;
}

Solution

  • It is indeed possible to keep all classes containing "model" in the classpath using this -keep option.

    Recently there was a tool released to inspect what parts of a jar/apk are being kept thus not shrunken/optimized. You can provide the -keep option and upload the jar/apk, you can then see in a visual way what parts of your project are not processed with ProGuard. This tool is called the ProGuard Playground.