ProGuard and multi-project builds

Currently, we have a single ProGuard task in our project, which obfuscates all jars in one pass. This obfuscation task is now proving to be a bottleneck, as a change in one subproject requires re-obfuscating every jar in the project. I’d prefer only to update the jars which actually changed.

To reduce the amount of unnecessary work during our build, I’d like to obfuscate incrementally instead. That way, if I only modify the top-level GUI code, I don’t have to re-obfuscate the entire large project. (Assuming, of course, that up-to-date checking works properly for that task.)

Just defining one ProGuard task per project doesn’t seem to be enough to get this to work, because we’d want each jar file to be compatible with other obfuscated jar files in the same build. We’d also want the mapping files to be merged, as people who deobfuscate stack traces don’t like having to do that themselves.

Does anyone have a build where they’re doing this and are able to share their tricks?