Exclude packages from proguard

How can I cancel some of the packages after I exclude the parent package in proguard.cfg:

Example:

-keep com.myapp. ** {*; }

I want proguard to obfuscate com.myapp.data. ** {*; }

+6
source share
1 answer

You can use ProGuard-style regular expressions for the class name:

-keep class !com.myapp.data.**,com.myapp.** { *; } 
+9
source

Source: https://habr.com/ru/post/952846/


All Articles