Update enum keep rules for r8 cli
Fixes: b/294351878
Change-Id: Iab250c05bac54fd579f8c480ad3e0d648ab25d26
diff --git a/src/main/keep_r8resourceshrinker.txt b/src/main/keep_r8resourceshrinker.txt
index f7c7166..72bc436 100644
--- a/src/main/keep_r8resourceshrinker.txt
+++ b/src/main/keep_r8resourceshrinker.txt
@@ -2,7 +2,5 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
-# TODO(b/294351878): Remove once enum issue is fixed.
--keep class com.android.resources.ResourceType { *; }
-
--keep class com.android.resources.ResourceFolderType { *; }
+-keepclassmembers enum com.android.resources.ResourceType { public static **[] values(); }
+-keepclassmembers enum com.android.resources.ResourceFolderType { public static **[] values(); }
diff --git a/src/main/resourceshrinker_cli.txt b/src/main/resourceshrinker_cli.txt
index 58424d9..6273a47 100644
--- a/src/main/resourceshrinker_cli.txt
+++ b/src/main/resourceshrinker_cli.txt
@@ -2,6 +2,9 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
+-keepclassmembers enum com.android.resources.ResourceType { public static **[] values(); }
+-keepclassmembers enum com.android.resources.ResourceFolderType { public static **[] values(); }
+
-keep class com.android.build.shrinker.ResourceShrinkerCli {
public static void main(java.lang.String[]);
}