【发布时间】:2014-07-05 05:30:12
【问题描述】:
我的proguard有
-keep public class * extends android.app.Activity
我遵循的规则将保留所有活动,但标有“可混淆”界面的活动除外:
public class SensitiveActivity extends Activity implements Obfuscateable
是否有一个否定规则,所以 Proguard 保留所有活动(第一条规则)减去那些标记为接口 Obfuscateable 的活动?我的意思是,就像“保持”的反义词?
在相关的手册部分http://proguard.sourceforge.net/index.html#manual/usage.html有一个类规范的模板,但我不是很明白:
[@annotationtype] [[!]public|final|abstract|@ ...] [!]interface|class|enum classname
[extends|implements [@annotationtype] classname]
[{
[@annotationtype] [[!]public|private|protected|static|volatile|transient ...] <fields> |
(fieldtype fieldname);
[@annotationtype] [[!]public|private|protected|static|synchronized|native|abstract|strictfp ...] <methods> |
<init>(argumenttype,...) |
classname(argumenttype,...) |
(returntype methodname(argumenttype,...));
[@annotationtype] [[!]public|private|protected|static ... ] *;
...
}]
【问题讨论】: