2016-08-16 06:48:56 +00:00
|
|
|
# -----不优化-----
|
|
|
|
-dontoptimize
|
|
|
|
|
|
|
|
# -----忽略所有警告-----
|
|
|
|
-dontwarn
|
|
|
|
-dontnote
|
|
|
|
|
|
|
|
# -----混淆时应用侵入式重载-----
|
2016-12-12 09:51:51 +00:00
|
|
|
-overloadaggressively
|
2016-08-16 06:48:56 +00:00
|
|
|
|
|
|
|
# -----启用混淆字典-----
|
|
|
|
-obfuscationdictionary obf.dict
|
2016-12-11 14:40:57 +00:00
|
|
|
-classobfuscationdictionary obf.dict
|
|
|
|
-packageobfuscationdictionary obf.dict
|
2016-08-16 06:48:56 +00:00
|
|
|
|
|
|
|
# -----保留所有属性
|
|
|
|
-keepattributes **
|
|
|
|
|
|
|
|
# -----保护所有实体中的字段名称-----
|
2016-12-11 14:40:57 +00:00
|
|
|
-keepclassmembers class * implements java.io.Serializable { <fields>; }
|
2016-08-16 06:48:56 +00:00
|
|
|
|
|
|
|
# -----保护监听方法不被清理-----
|
2016-12-11 14:40:57 +00:00
|
|
|
-keepclassmembers class * implements org.bukkit.event.Listener {
|
2016-12-12 09:51:51 +00:00
|
|
|
@org.bukkit.event.EventHandler <methods>;
|
2016-08-16 06:48:56 +00:00
|
|
|
}
|
2016-12-11 14:40:57 +00:00
|
|
|
-keepclassmembers class * implements net.md_5.bungee.api.plugin.Listener {
|
2016-12-12 09:51:51 +00:00
|
|
|
@net.md_5.bungee.event.EventHandler <methods>;
|
2016-12-11 14:40:57 +00:00
|
|
|
}
|
|
|
|
|
2017-03-09 01:25:49 +00:00
|
|
|
# -----保护继承事件不被清理-----
|
|
|
|
-keep class ** extends org.bukkit.event.Event {*;}
|
|
|
|
|
2016-12-11 14:40:57 +00:00
|
|
|
# -----保护枚举方法的完整性-----
|
|
|
|
-keepclassmembers enum * {
|
2016-12-12 09:51:51 +00:00
|
|
|
public static **[] values();
|
|
|
|
public static ** valueOf(java.lang.String);
|
2016-12-11 14:40:57 +00:00
|
|
|
}
|
|
|
|
|
2016-08-16 06:48:56 +00:00
|
|
|
# -----保护配置注入不被清理-----
|
2016-12-12 09:51:51 +00:00
|
|
|
-keepclassmembers class * extends **.config.inject.Inject** {
|
|
|
|
<fields>;
|
2017-03-09 01:25:49 +00:00
|
|
|
public <init>(org.bukkit.configuration.ConfigurationSection);
|
2016-12-11 14:40:57 +00:00
|
|
|
}
|
|
|
|
|
2016-08-16 06:48:56 +00:00
|
|
|
# -----保护注解命令方法不被清理-----
|
2016-12-12 09:51:51 +00:00
|
|
|
-keepclassmembers class **.commands.annotation.** {<methods>;}
|
|
|
|
-keepclassmembers class * implements **.commands.interfaces.Executor {<methods>;}
|
2016-12-11 14:40:57 +00:00
|
|
|
|
2016-08-16 06:48:56 +00:00
|
|
|
# -----保护注解NotProguard标记-----
|
|
|
|
-keep class **.NotProguard
|
|
|
|
-keep @**.NotProguard class * {*;}
|
2016-12-11 14:40:57 +00:00
|
|
|
-keepclassmembers class * {
|
2016-12-12 09:51:51 +00:00
|
|
|
@**.NotProguard <fields>;
|
|
|
|
@**.NotProguard <methods>;
|
2016-12-11 14:40:57 +00:00
|
|
|
}
|