Why some package-private classes are not obfuscated by Proguard?

拟墨画扇 提交于 2019-12-01 07:54:54

Are you working on an Android Library project? Probably YES.

In order to achieve your purpose, I am afraid that you need to re-organise your packages into something like below:

Public interfaces

com.my.package.apiforusers

Private/Internal implementations

com.my.package.apiforusers.internal

Then for your obfuscation rules, you can have it like below:

-keep public class com.my.package.apiforusers.* { public *; }

So that only the public classes/interfaces are kept and all those ones inside com.my.package.apiforusers.internal will be obfuscated.

In "/build/outputs/mapping/release/" folder there are few files ("usage.txt", "seeds.txt", etc..) that contain the REASONS of why and which classes/variables/methods/etc.. are not-processed/not-shrinked/ot-obfuscated via ProGuard utilities.

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