How can I obfuscate only com.foo.* and com.bar.* (ProGuard)?

后端 未结 1 1372
余生分开走
余生分开走 2021-02-02 07:54

I want to obfuscate only some packages:

com.foo.*
com.bar.*

I have tried

-keepclasseswithmembers class **, !com.foo.**, !com.ba         


        
1条回答
  •  清酒与你
    2021-02-02 08:19

    This should work

    -keep class !com.foo.**,!com.bar.** { *; }
    

    You can find a summary of the various -keep options at http://proguard.sourceforge.net/manual/usage.html#keepoverview

    You can find the explanation of ProGuard's regular expressions at http://proguard.sourceforge.net/manual/usage.html#filters

    0 讨论(0)
提交回复
热议问题