Merge "Add keep rules for @KeepForWeakReference annotation" am: 3eb3ca0c9b am: 41437def9a

Original change: https://android-review.googlesource.com/c/platform/build/+/2094724

Change-Id: I1d84cfafbe51f2a0a2e090aef1f10beff55a52f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-05-16 22:05:55 +00:00 committed by Automerger Merge Worker
commit 54c1f7cea3

View file

@ -15,6 +15,12 @@
@**.VisibleForTesting *;
}
# Keep rule for members that are needed solely to keep alive downstream weak
# references, and could otherwise be removed after tree shaking optimizations.
-keepclassmembers,allowaccessmodification,allowobfuscation,allowshrinking class * {
@com.android.internal.annotations.KeepForWeakReference <fields>;
}
# Understand the common @Keep annotation from various Android packages:
# * android.support.annotation
# * androidx.annotation