Is proguard.cfg needed for library projects?

Regex Rookie picture Regex Rookie · Jun 11, 2012 · Viewed 9k times · Source

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?

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?

Answer

Eric Lafortune picture Eric Lafortune · Jun 12, 2012

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

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.