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 |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 13 | |
Tor Norbye | 0bf1b2c | 2012-01-17 09:23:34 -0800 | [diff] [blame^] | 14 | # If you want to enable optimization, you should include the |
| 15 | # following: |
| 16 | # -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* |
| 17 | # -optimizationpasses 5 |
| 18 | # -allowaccessmodification |
| 19 | # |
| 20 | # Note that you cannot just include these flags in your own |
| 21 | # configuration file; if you are including this file, optimization |
| 22 | # will be turned off. You'll need to either edit this file, or |
| 23 | # duplicate the contents of this file and remove the include of this |
| 24 | # file from your project's proguard.config path property. |
| 25 | |
| 26 | -keepattributes *Annotation* |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 27 | -keep public class * extends android.app.Activity |
| 28 | -keep public class * extends android.app.Application |
| 29 | -keep public class * extends android.app.Service |
| 30 | -keep public class * extends android.content.BroadcastReceiver |
| 31 | -keep public class * extends android.content.ContentProvider |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame] | 32 | -keep public class * extends android.app.backup.BackupAgent |
Xavier Ducrohet | 88dcd9a | 2010-11-15 14:14:55 -0800 | [diff] [blame] | 33 | -keep public class * extends android.preference.Preference |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 34 | -keep public class com.android.vending.licensing.ILicensingService |
| 35 | |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame] | 36 | # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 37 | -keepclasseswithmembernames class * { |
| 38 | native <methods>; |
| 39 | } |
| 40 | |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame] | 41 | -keep public class * extends android.view.View { |
| 42 | public <init>(android.content.Context); |
| 43 | public <init>(android.content.Context, android.util.AttributeSet); |
| 44 | public <init>(android.content.Context, android.util.AttributeSet, int); |
| 45 | public void set*(...); |
| 46 | } |
| 47 | |
Tor Norbye | aef49b2 | 2011-06-10 13:58:35 -0700 | [diff] [blame] | 48 | -keepclasseswithmembers class * { |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 49 | public <init>(android.content.Context, android.util.AttributeSet); |
| 50 | } |
| 51 | |
Tor Norbye | aef49b2 | 2011-06-10 13:58:35 -0700 | [diff] [blame] | 52 | -keepclasseswithmembers class * { |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 53 | public <init>(android.content.Context, android.util.AttributeSet, int); |
| 54 | } |
| 55 | |
Tor Norbye | aef49b2 | 2011-06-10 13:58:35 -0700 | [diff] [blame] | 56 | -keepclassmembers class * extends android.app.Activity { |
| 57 | public void *(android.view.View); |
| 58 | } |
| 59 | |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame] | 60 | # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations |
Xavier Ducrohet | a89eaf9 | 2010-10-06 15:06:53 -0700 | [diff] [blame] | 61 | -keepclassmembers enum * { |
| 62 | public static **[] values(); |
| 63 | public static ** valueOf(java.lang.String); |
| 64 | } |
| 65 | |
| 66 | -keep class * implements android.os.Parcelable { |
| 67 | public static final android.os.Parcelable$Creator *; |
| 68 | } |
Tor Norbye | 5d30fda | 2012-01-11 17:54:20 -0800 | [diff] [blame] | 69 | |
| 70 | -keepclassmembers class **.R$* { |
| 71 | public static <fields>; |
| 72 | } |
| 73 | |
| 74 | # The support library contains references to newer platform versions. |
| 75 | # Don't warn about those in case this app is linking against an older |
| 76 | # platform version. We know about them, and they are safe. |
| 77 | -dontwarn android.support.** |