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