diff options
author | zhidou <zhidou@google.com> | 2022-08-10 14:48:23 +0000 |
---|---|---|
committer | zhidou <zhidou@google.com> | 2022-08-10 14:48:23 +0000 |
commit | 00ea5ee7f55c005ee296f9a8bdc9986cfbc8eb07 (patch) | |
tree | 70dbf97336515f42e81fe6536b219c1fbff21a5b | |
parent | 17bfa62a87f188a65842003c661fa2041bbaa4ce (diff) | |
download | build-00ea5ee7f55c005ee296f9a8bdc9986cfbc8eb07.tar.gz |
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
-rw-r--r-- | core/proguard_basic_keeps.flags | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags index 54cbdccf3b..b5d14fa6b2 100644 --- a/core/proguard_basic_keeps.flags +++ b/core/proguard_basic_keeps.flags @@ -2,6 +2,11 @@ # that isn't explicitly part of the API -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 -keepclassmembers enum * { public static **[] values(); |