forked from openkylin/platform_build
Understand the support library/androidx @Keep annotations
Copied from tools/base/build-system/gradle-core/src/main/resources/com/android/build/gradle/proguard-common.txt. Fixes: 129311848 Test: none Change-Id: Ie8b40b416c8772a550bb4d1f7bd6e7e944cdd166
This commit is contained in:
parent
d7060a50f9
commit
38b48debc5
|
@ -15,4 +15,35 @@
|
||||||
@**.VisibleForTesting *;
|
@**.VisibleForTesting *;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Understand the @Keep support annotation.
|
||||||
|
-keep class android.support.annotation.Keep
|
||||||
|
-keep class androidx.annotation.Keep
|
||||||
|
|
||||||
|
-keep @android.support.annotation.Keep class * {*;}
|
||||||
|
-keep @androidx.annotation.Keep class * {*;}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
@android.support.annotation.Keep <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
@androidx.annotation.Keep <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
@android.support.annotation.Keep <fields>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
@androidx.annotation.Keep <fields>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
@android.support.annotation.Keep <init>(...);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
@androidx.annotation.Keep <init>(...);
|
||||||
|
}
|
||||||
|
|
||||||
-include proguard_basic_keeps.flags
|
-include proguard_basic_keeps.flags
|
||||||
|
|
Loading…
Reference in New Issue