How to exclude a classes from being kept by proguard

雨燕双飞 提交于 2019-12-01 05:53:16

问题


I added the following line in my proguard config:

 -keep class com.mypackage.** {*;}

But now proguard doesn't remove my class com.mypackage.BuildConfig.class from the result. And I want it to be removed.

How can I exclude a given class from being kept?

Thanks


回答1:


You can use the following rule:

-keep class !com.mypackage.BuildConfig, com.mypackage.** { *; }


来源:https://stackoverflow.com/questions/41060827/how-to-exclude-a-classes-from-being-kept-by-proguard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!