是proguard.cfg需要的库项目?项目、proguard、cfg

2023-09-12 02:23:58 作者:墨染离殇

假设我需要应用相同的规则为一个应用程序项目,其依赖库项目,我需要重复proguard.cfg从应用程序的内容到库项目?

Assuming I need to apply the same rules for both an application project and a library project on which it relies, do I need to duplicate the content of proguard.cfg from the application to the library project?

在换句话说,它的应用程序的proguard.cfg接管所有它所依赖的库项目,或必须明确指定为每个库项目的规则?

In other words, does the application's proguard.cfg "take over" all the library projects on which it depends, or must I explicitly specify rules for each of the library projects?

推荐答案

自行库项目不运行ProGuard的,所以他们不使用任何配置。

Library projects by themselves don't run ProGuard, so they don't use any configuration.

应用程序项目混淆了整个code基地,包括任何引用的库,所以需要正确配置应用程序code和库code。

Application projects obfuscate the entire code base, including any referenced libraries, so they need proper configuration for the application code and for the library code.