diff --git a/build.gradle.kts b/build.gradle.kts index 70810d0..15ec9bd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 { ; }") keep("class $group.snowygui.gui.feature.* { public static *** INSTANCE; }") keepclassmembers("class $group.snowygui.** { public protected ; }") keepattributes("*Annotation*, Signature, InnerClasses, EnclosingMethod, MethodParameters, Synthetic, Exceptions") diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt index 070b0dd..d4d7a05 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt @@ -74,7 +74,7 @@ object Configuration { } val macros: MutableSet = 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() }