带有throws子句的混淆方法

Cog*_*gsy 18 java obfuscation proguard

我正在使用ProGuard来混淆我的代码.我的项目由几个模块组成,每个模块都独立进行模糊处理.

一个库包括一个接口;

public interface IFace {
    public int methodA(boolean b) throws CustomException;
}
Run Code Online (Sandbox Code Playgroud)

另一个库提供了一个实现

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

首先构建具有接口的库,然后针对混淆版本构建第二个库.不幸的是@Override,由于接口没有throws子句,编译失败了.

我有proguard保持接口及其所有成员,但我无法弄清楚如何保持throws条款.

Cog*_*gsy 42

我想到了.

-keepattributes Exceptions