开发者

How obfuscate part of code?

开发者 https://www.devze.com 2023-01-02 17:04 出处:网络
I try to obfusca开发者_如何学Gote my project, but not all code. I try obfuscate only code from 1 package.

I try to obfusca开发者_如何学Gote my project, but not all code. I try obfuscate only code from 1 package. How can i do it in yguard (or somewhere else, proguard?)? Thanks!


From the documentation:

There are three possible ways of specifying which classes will be excluded from the shrinking and obfuscation process:

It looks like the second way will be most useful for you:

One can specify multiple java classes using a modified version of a patternset. The patternset's includes and excludes element should use java syntax, but the usual wildcards are allowed. Some examples:

<class>
        <patternset>
          <include name="com.mycompany.**.*Bean"/>
          <exclude name="com.mycompany.secretpackage.*"/>
          <exclude name="com.mycompany.myapp.SecretBean"/>
        </patternset>
      </class>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号