Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00ea5ee7 authored by zhidou's avatar zhidou
Browse files

Ensure runtime-visible annotations are kept

With R8 full mode, these annotations must be explicitly kept as
attributes. Also keep annotation defaults as they may be used at
runtime.

Test: m + presubmit
Bug: 233746531
Merged-In: Ibab630cd8498c5789ebcad6785fda24967df4d61
Change-Id: Icf2cddf89d06d29bdbd000a8216d1b975b5f49d8
parent 17bfa62a
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,11 @@
# that isn't explicitly part of the API
# that isn't explicitly part of the API
-dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers
-dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers


# Annotations are implemented as attributes, so we have to explicitly keep them.
# Keep all runtime-visible annotations like RuntimeVisibleParameterAnnotations
# and RuntimeVisibleTypeAnnotations, as well as associated defaults.
-keepattributes RuntimeVisible*Annotation*,AnnotationDefault

# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
-keepclassmembers enum * {
    public static **[] values();
    public static **[] values();