Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 1 | -optimizationpasses 5 |
| 2 | -dontusemixedcaseclassnames |
| 3 | -dontskipnonpubliclibraryclasses |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 4 | -verbose |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame^] | 5 | -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* |
| 6 | -allowaccessmodification |
| 7 | -keepattributes *Annotation* |
| 8 | |
| 9 | |
| 10 | # dex does not like code run through proguard optimize and preverify steps. |
| 11 | -dontoptimize |
| 12 | -dontpreverify |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 13 | |
| 14 | -keep public class * extends android.app.Activity |
| 15 | -keep public class * extends android.app.Application |
| 16 | -keep public class * extends android.app.Service |
| 17 | -keep public class * extends android.content.BroadcastReceiver |
| 18 | -keep public class * extends android.content.ContentProvider |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame^] | 19 | -keep public class * extends android.app.backup.BackupAgent |
Xavier Ducrohet | 88dcd9a | 2010-11-15 14:14:55 -0800 | [diff] [blame] | 20 | -keep public class * extends android.preference.Preference |
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 | |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame^] | 28 | -keep public class * extends android.view.View { |
| 29 | public <init>(android.content.Context); |
| 30 | public <init>(android.content.Context, android.util.AttributeSet); |
| 31 | public <init>(android.content.Context, android.util.AttributeSet, int); |
| 32 | public void set*(...); |
| 33 | } |
| 34 | |
Tor Norbye | aef49b2 | 2011-06-10 13:58:35 -0700 | [diff] [blame] | 35 | -keepclasseswithmembers class * { |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 36 | public <init>(android.content.Context, android.util.AttributeSet); |
| 37 | } |
| 38 | |
Tor Norbye | aef49b2 | 2011-06-10 13:58:35 -0700 | [diff] [blame] | 39 | -keepclasseswithmembers class * { |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 40 | public <init>(android.content.Context, android.util.AttributeSet, int); |
| 41 | } |
| 42 | |
Tor Norbye | aef49b2 | 2011-06-10 13:58:35 -0700 | [diff] [blame] | 43 | -keepclassmembers class * extends android.app.Activity { |
| 44 | public void *(android.view.View); |
| 45 | } |
| 46 | |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame^] | 47 | # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 48 | -keepclassmembers enum * { |
| 49 | public static **[] values(); |
| 50 | public static ** valueOf(java.lang.String); |
| 51 | } |
| 52 | |
| 53 | -keep class * implements android.os.Parcelable { |
| 54 | public static final android.os.Parcelable$Creator *; |
| 55 | } |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame^] | 56 | |
| 57 | -keepclassmembers class **.R$* { |
| 58 | public static <fields>; |
| 59 | } |
| 60 | |
| 61 | # The support library contains references to newer platform versions. |
| 62 | # Don't warn about those in case this app is linking against an older |
| 63 | # platform version. We know about them, and they are safe. |
| 64 | -dontwarn android.support.** |