Android O MR1 SDK.
[android_tools.git] / sdk / tools / proguard / proguard-android.txt
blobc72df632a3c37290d44b1ec650cda37977e528a2
1 # This is a configuration file for ProGuard.
2 # http://proguard.sourceforge.net/index.html#manual/usage.html
4 # This file is no longer maintained and is not used by new (2.2+) versions of the
5 # Android plugin for Gradle. Instead, the Android plugin for Gradle generates the
6 # default rules at build time and stores them in the build directory.
8 -dontusemixedcaseclassnames
9 -dontskipnonpubliclibraryclasses
10 -verbose
12 # Optimization is turned off by default. Dex does not like code run
13 # through the ProGuard optimize and preverify steps (and performs some
14 # of these optimizations on its own).
15 -dontoptimize
16 -dontpreverify
17 # Note that if you want to enable optimization, you cannot just
18 # include optimization flags in your own project configuration file;
19 # instead you will need to point to the
20 # "proguard-android-optimize.txt" file instead of this one from your
21 # project.properties file.
23 -keepattributes *Annotation*
24 -keep public class com.google.vending.licensing.ILicensingService
25 -keep public class com.android.vending.licensing.ILicensingService
27 # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
28 -keepclasseswithmembernames class * {
29     native <methods>;
32 # keep setters in Views so that animations can still work.
33 # see http://proguard.sourceforge.net/manual/examples.html#beans
34 -keepclassmembers public class * extends android.view.View {
35    void set*(***);
36    *** get*();
39 # We want to keep methods in Activity that could be used in the XML attribute onClick
40 -keepclassmembers class * extends android.app.Activity {
41    public void *(android.view.View);
44 # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
45 -keepclassmembers enum * {
46     public static **[] values();
47     public static ** valueOf(java.lang.String);
50 -keepclassmembers class * implements android.os.Parcelable {
51   public static final android.os.Parcelable$Creator CREATOR;
54 -keepclassmembers class **.R$* {
55     public static <fields>;
58 # The support library contains references to newer platform versions.
59 # Don't warn about those in case this app is linking against an older
60 # platform version.  We know about them, and they are safe.
61 -dontwarn android.support.**
63 # Understand the @Keep support annotation.
64 -keep class android.support.annotation.Keep
66 -keep @android.support.annotation.Keep class * {*;}
68 -keepclasseswithmembers class * {
69     @android.support.annotation.Keep <methods>;
72 -keepclasseswithmembers class * {
73     @android.support.annotation.Keep <fields>;
76 -keepclasseswithmembers class * {
77     @android.support.annotation.Keep <init>(...);