views:

129

answers:

1

I'm using ProGuard to obfuscate my code. My project is comprised of a few modules, each obfuscated independently.

One library includes an interface;

public interface IFace {
    public int methodA(boolean b) throws CustomException;
}

Another library provides an implmentation

public class IFaceImpl implements IFace {
    @Override
    public int methodA(boolean b) throws CustomException {
        return 0;
    }
}

The library with the interface is built first, and the second is built against the obfuscated version. Unfortunately the compile fails on the @Override as the interface does not have the throws clause.

I have proguard keeping the interface and all its members, but I can't figure out how to keep the throws clause.

+2  A: 

I figured it out.

-keepattributes Exceptions;

Cogsy