From 0a5d9d6ae81b5511c62bcfcefd0c86aee65e7288 Mon Sep 17 00:00:00 2001 From: Stephanie Gawroriski Date: Sun, 5 Feb 2023 23:37:22 +0000 Subject: [PATCH] Keep enum values since valueOf(String) can depend on them along with name(). --- .../cc/squirreljme/plugin/multivm/VMCompactLibraryTaskAction.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/cc/squirreljme/plugin/multivm/VMCompactLibraryTaskAction.java b/buildSrc/src/main/java/cc/squirreljme/plugin/multivm/VMCompactLibraryTaskAction.java index c96a6beb1b..e81810df12 100644 --- a/buildSrc/src/main/java/cc/squirreljme/plugin/multivm/VMCompactLibraryTaskAction.java +++ b/buildSrc/src/main/java/cc/squirreljme/plugin/multivm/VMCompactLibraryTaskAction.java @@ -102,13 +102,17 @@ public class VMCompactLibraryTaskAction "}", // Do not trash enumerations as we need those to work properly - "-keepclassmembers,allowoptimization", "enum", "*", "{", + "-keepclassmembers", "class", "*", + "extends", "java.lang.Enum", "{", + "", ";", "public", "static", "**[]", "values", "(", ")", ";", "public", "static", "**", "valueOf", "(", "java.lang.String", ")", ";", "}", - "-keepclassmembernames,allowoptimization", "enum", "*", "{", + "-keepclassmembernames", "class", "*", + "extends", "java.lang.Enum", "{", + "", ";", "public", "static", "**[]", "values", "(", ")", ";", "public", "static", "**", "valueOf", -- 2.11.4.GIT