I really love ProGuard. I'm using it to compress a large program I've written, but I've found an odd problem.
My program is in two parts (two jars), A & B. B is the main program. A depends completely on B, though B doesn't need A.
In ProGuard I have input and output jars as follows:
That's worked beautifully until now.
But after recent development, when classes get merged, some static methods (to do with color blending) from a class in jar B get given to a class in jar A (to do with LZMA compression!).
The trouble is, when the program in B is running, the stuff from A isn't always available. B normally has no dependencies on A. But after the classes are merged, B tries to use its helper functions for color blending and crashes with a mysterious ClassNotFoundException because the LZMA compression code isn't there!
I can work around it by duplicating A's classes in the B jar. It's not a big problem for me because jar A is small (20 kB). But it's quirky. It feels like a bug, if jars that are normally separate can magically grow these dependencies to each other. The fix would be to limit class merge candidates to classes from the same input/output pairs. Or is there something I'm doing wrong?
Thanks for reading.