Problems with obfuscating an Android library project using Proguard

There are well-known considerations and problems when using Proguard in an Android library project. Usually the main logic:

  • Use the correct code rules and set only the open API as public foo()...
  • Use the well-known Proguard rules, which look like "obfuscate all privates"

These ( with other well-known Proguard library rules ) guarantee the usually desired result.

The hack is that I have a large (and complex in terms of dependency and using third-party API and SDK) library project that has not historically been written with good coding rules. Thus, the trivial solution is to move from class to class and prepare some kind of ordinary rule -keepfor everyone. This is a completely unrealistic task. Is there any other alternative in such cases? The goal is obfuscation that doesn't use Proguard, so I'm open to using alternatives.

+4
source share

Source: https://habr.com/ru/post/1614031/


All Articles