Skip to content
Advertisement

How to configure proguard to keep all classes in packages that contain a specific word in package name?

I am trying to keep all classes in packages that contain the word model in the package name.

Eg – com.xyz.model, com.xyz.abc.model, com.xyz.model.abc

All the classes in these packages should not be obfuscated.

I tried using wildcard for package names but it isn’t working

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

How to achieve the desired result?

Advertisement

Answer

Please try below. Remove dot(.) before the model.

-keep class com.xyz.**model.**{ *; }
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement