-allowaccessmodificationonlyifrenamed
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
I have a library. I need to -keep some classes and -repackageclasses the rest, and I need to -allowaccessmodification so -repackageclasses works completely, but that also modifies access flags in the classes that I -keep.
I'd like an option, say -allowaccessmodificationonlyifrenamed, that will modify access flags only in renamed classes.
Thanks for the suggestion. It's well-researched and I see your point. However, adding another option for it would further increase the complexity of the configuration for non-experts, so I'm very reluctant. For now, you should avoid the option if you don't want the access flags to be changed in some places.
With -allowaccessmodification, some classes I -keep have modified access flags. Without -allowaccessmodification, some classes are renamed but not repackaged. Neither situation is desirable, and there's no easy workaround for this...