# -----不优化----- -dontoptimize # -----忽略所有警告----- -dontwarn -dontnote # -----混淆时应用侵入式重载----- -overloadaggressively # -----启用混淆字典----- -obfuscationdictionary obf.dict -classobfuscationdictionary class.dict -packageobfuscationdictionary class.dict # -----保留所有属性 -keepattributes ** # -----公共数据不混淆----- -keep class cn.citycraft.CommonData.** {*;} # -----保护所有实体中的字段名称----- -keepclassmembers class * implements java.io.Serializable { ; } # -----保护监听方法不被清理----- -keepclassmembers class * implements org.bukkit.event.Listener { @org.bukkit.event.EventHandler ; } # -----保护配置注入不被清理----- -keepclassmembers class * extends **.config.InjectConfigurationSection { ; } -keepclassmembers class * extends **.config.InjectConfig { ; } # -----保护注解命令方法不被清理----- -keepclassmembers class **.commands.annotation.** { ; } -keepclassmembers class * implements **.commands.CommandExecutor { ; } -keepclassmembers class **.commands.HandlerCommand { ; } -keepclassmembers class * implements **.commands.HandlerCommands { @**.commands.HandlerCommand ; @**.commands.HandlerTabComplete ; } # -----保护注解NotProguard标记----- -keep class **.NotProguard -keep @**.NotProguard class * {*;} -keepclassmembers class * { @**.NotProguard ; @**.NotProguard ; } # -----保护命令解析正常----- -keepnames class * extends **.commands.BaseCommand