Learning
Learning

Reputation: 89

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?

Upvotes: 2

Views: 2025

Answers (1)

Shalu T D
Shalu T D

Reputation: 4039

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

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

Upvotes: 6

Related Questions