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