From e827be770da068f1cf39100b4dd13ba9ae18d80f Mon Sep 17 00:00:00 2001 From: Christoffer Adamsen Date: Fri, 17 Jan 2025 04:46:14 -0800 Subject: 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: I984bb44e485abb7585224a3f2657132df53b0ea2 Test: existing --- packages/ExtShared/Android.bp | 1 + packages/ExtShared/proguard.proguard | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ExtShared/Android.bp b/packages/ExtShared/Android.bp index b1fd7f64292d..58016f78782a 100644 --- a/packages/ExtShared/Android.bp +++ b/packages/ExtShared/Android.bp @@ -38,6 +38,7 @@ android_app { aaptflags: ["--shared-lib"], export_package_resources: true, optimize: { + keep_runtime_invisible_annotations: true, proguard_flags_files: ["proguard.proguard"], }, } diff --git a/packages/ExtShared/proguard.proguard b/packages/ExtShared/proguard.proguard index e5dfbe1c453d..699fbdaaadad 100644 --- a/packages/ExtShared/proguard.proguard +++ b/packages/ExtShared/proguard.proguard @@ -1,6 +1,8 @@ -keepparameternames -keepattributes Exceptions,InnerClasses,Signature,Deprecated, - SourceFile,LineNumberTable,*Annotation*,EnclosingMethod + SourceFile,LineNumberTable,EnclosingMethod, + RuntimeVisibleAnnotations,RuntimeVisibleParameterAnnotations, + RuntimeVisibleTypeAnnotations,AnnotationDefault -keep public class * { public protected *; -- cgit v1.2.3-59-g8ed1b