diff --git a/core/proguard.flags b/core/proguard.flags index 50049cbdad..185275e858 100644 --- a/core/proguard.flags +++ b/core/proguard.flags @@ -15,35 +15,24 @@ @**.VisibleForTesting *; } -# Understand the @Keep support annotation. --keep class android.support.annotation.Keep --keep class androidx.annotation.Keep +# Understand the common @Keep annotation from various Android packages: +# * android.support.annotation +# * androidx.annotation +# * com.android.internal.annotations +-keep class **android**.annotation*.Keep --keep @android.support.annotation.Keep class * {*;} --keep @androidx.annotation.Keep class * {*;} +-keep @**android**.annotation*.Keep class * { *; } -keepclasseswithmembers class * { - @android.support.annotation.Keep ; + @**android**.annotation*.Keep ; } -keepclasseswithmembers class * { - @androidx.annotation.Keep ; + @**android**.annotation*.Keep ; } -keepclasseswithmembers class * { - @android.support.annotation.Keep ; -} - --keepclasseswithmembers class * { - @androidx.annotation.Keep ; -} - --keepclasseswithmembers class * { - @android.support.annotation.Keep (...); -} - --keepclasseswithmembers class * { - @androidx.annotation.Keep (...); + @**android**.annotation*.Keep (...); } -include proguard_basic_keeps.flags