Don't obfuscate fields in Macro.kt

This commit is contained in:
Username404 2021-05-20 17:46:28 +02:00
parent 3008165c22
commit 4dfd850f33
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 2 additions and 1 deletions

View File

@ -82,6 +82,7 @@ subprojects {
keep("class $group.snowygui.fabric.**")
keep("class $group.snowygui.forge.**")
keepnames("class $group.snowygui.Snowy")
keepnames("class $group.snowygui.gui.feature.Macro { <fields>; }")
keep("class $group.snowygui.gui.feature.* { public static *** INSTANCE; }")
keepclassmembers("class $group.snowygui.** { public protected <methods>; }")
keepattributes("*Annotation*, Signature, InnerClasses, EnclosingMethod, MethodParameters, Synthetic, Exceptions")

View File

@ -74,7 +74,7 @@ object Configuration {
}
val macros: MutableSet<Macro> = run {
if (!macroFile.exists()) macroFile.createNewFile()
macroFile.readLines(Charset.forName("UTF-8")).map {
macroFile.readLines(Charset.forName("UTF-8")).filterNot { it.isBlank() }.map {
Snowy.Gson.fromJson(it, Macro::class.java).copy()
}.toMutableSet()
}