0

I have a simple problem: A third party dependency jar (BouncyCastle) that I want to shrink to avoid the 65k method dex limit. But using ProGuard creates thousands (literally!) of new problems (in addition to the warnings it generates): Explicit coupling between my third party libraries and proguard config files which to me seems ridiculous. But enough bashing of ProGuard...

Is there a way to tell ProGuard to exclude most of the code and only optimize/shrink/etc the one library that I have a problem with?

Alix
  • 2,630
  • 30
  • 72
  • https://stackoverflow.com/a/31508908/1643723 – user1643723 Oct 18 '17 at 09:42
  • Thanks but this does not look like minimum impact. I don't want to sanitize a jar file and then check it in as I want it to be hassle-free to update my dependencies. So an automated way. – Alix Oct 19 '17 at 13:41
  • Have you read the entire answer? At the end it provides Proguard configuration, that allows you to do exactly that: list Proguard-compatible packages once and update the list only when you need to achieve better shrinking. If you use that configuration, you won't have to update it each time a new library is added to the project (because it excludes all not-listed packages by default). Sorry, there is no magical way to automate any more than that. – user1643723 Oct 20 '17 at 03:24

0 Answers0