Do not keep runtime invisible annotations in proguard.proguard
This updates the corresponding Android.bp file to keep the runtime invisible annotations, meaning this should be a no-op.
When RELEASE_R8_ONLY_RUNTIME_VISIBLE_ANNOTATIONS is enabled, keep_runtime_invisible_annotations will become a no-op, which should lead to all runtime invisible annotations being stripped from this build.
Bug: 387958004
Change-Id: I81e202858beb970ae06c3d738c2ad4c5193a01f6
Test: existing
diff --git a/Android.bp b/Android.bp
index 2d76e0f..ae163b2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -81,6 +81,7 @@
shrink_resources: true,
proguard_compatibility: false,
proguard_flags_files: ["proguard.proguard"],
+ keep_runtime_invisible_annotations: true,
},
privileged: true,
privapp_allowlist: ":privapp_allowlist_android.ext_tplus.services.xml",
@@ -111,6 +112,7 @@
shrink_resources: true,
proguard_compatibility: false,
proguard_flags_files: ["proguard.proguard"],
+ keep_runtime_invisible_annotations: true,
},
privileged: true,
privapp_allowlist: ":privapp_allowlist_android.ext_sminus.services.xml",
diff --git a/proguard.proguard b/proguard.proguard
index e873931..0cd5be9 100644
--- a/proguard.proguard
+++ b/proguard.proguard
@@ -1,6 +1,8 @@
-keepparameternames
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,
- SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
+ SourceFile,LineNumberTable,EnclosingMethod,
+ RuntimeVisibleAnnotations,RuntimeVisibleParameterAnnotations,
+ RuntimeVisibleTypeAnnotations,AnnotationDefault
# Rules required by TextClassifierServiceLibNoManifest
# Jni classes