xref: /aosp_15_r20/sdk/files/proguard-android.txt (revision 1789df15502f1991eff51ff970dce5df8404dd56)
1*1789df15SXin Li# This is a configuration file for ProGuard.
2*1789df15SXin Li# http://proguard.sourceforge.net/index.html#manual/usage.html
3*1789df15SXin Li
4*1789df15SXin Li-dontusemixedcaseclassnames
5*1789df15SXin Li-dontskipnonpubliclibraryclasses
6*1789df15SXin Li-verbose
7*1789df15SXin Li
8*1789df15SXin Li# Optimization is turned off by default. Dex does not like code run
9*1789df15SXin Li# through the ProGuard optimize and preverify steps (and performs some
10*1789df15SXin Li# of these optimizations on its own).
11*1789df15SXin Li-dontoptimize
12*1789df15SXin Li-dontpreverify
13*1789df15SXin Li# Note that if you want to enable optimization, you cannot just
14*1789df15SXin Li# include optimization flags in your own project configuration file;
15*1789df15SXin Li# instead you will need to point to the
16*1789df15SXin Li# "proguard-android-optimize.txt" file instead of this one from your
17*1789df15SXin Li# project.properties file.
18*1789df15SXin Li
19*1789df15SXin Li-keepattributes *Annotation*
20*1789df15SXin Li-keep public class com.google.vending.licensing.ILicensingService
21*1789df15SXin Li-keep public class com.android.vending.licensing.ILicensingService
22*1789df15SXin Li
23*1789df15SXin Li# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
24*1789df15SXin Li-keepclasseswithmembernames class * {
25*1789df15SXin Li    native <methods>;
26*1789df15SXin Li}
27*1789df15SXin Li
28*1789df15SXin Li# keep setters in Views so that animations can still work.
29*1789df15SXin Li# see http://proguard.sourceforge.net/manual/examples.html#beans
30*1789df15SXin Li-keepclassmembers public class * extends android.view.View {
31*1789df15SXin Li   void set*(***);
32*1789df15SXin Li   *** get*();
33*1789df15SXin Li}
34*1789df15SXin Li
35*1789df15SXin Li# We want to keep methods in Activity that could be used in the XML attribute onClick
36*1789df15SXin Li-keepclassmembers class * extends android.app.Activity {
37*1789df15SXin Li   public void *(android.view.View);
38*1789df15SXin Li}
39*1789df15SXin Li
40*1789df15SXin Li# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
41*1789df15SXin Li-keepclassmembers enum * {
42*1789df15SXin Li    public static **[] values();
43*1789df15SXin Li    public static ** valueOf(java.lang.String);
44*1789df15SXin Li}
45*1789df15SXin Li
46*1789df15SXin Li-keepclassmembers class * implements android.os.Parcelable {
47*1789df15SXin Li  public static final android.os.Parcelable$Creator CREATOR;
48*1789df15SXin Li}
49*1789df15SXin Li
50*1789df15SXin Li-keepclassmembers class **.R$* {
51*1789df15SXin Li    public static <fields>;
52*1789df15SXin Li}
53*1789df15SXin Li
54*1789df15SXin Li# The support library contains references to newer platform versions.
55*1789df15SXin Li# Don't warn about those in case this app is linking against an older
56*1789df15SXin Li# platform version.  We know about them, and they are safe.
57*1789df15SXin Li-dontwarn android.support.**
58