Created
October 9, 2014 11:04
-
-
Save andyb129/c3a6af1b3cde94bae34f to your computer and use it in GitHub Desktop.
Default proguard rules template based on the following blog posts, http://omgitsmgp.com/2013/09/09/a-conservative-guide-to-proguard-for-android/ and http://www.crashlytics.com/blog/mastering-proguard-for-building-lightweight-android-code/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add project specific ProGuard rules here. | |
# By default, the flags in this file are appended to flags specified | |
# in F:\1.Local_Docs\2.AndroidSDK\sdk/tools/proguard/proguard-android.txt | |
# You can edit the include path and order by changing the proguardFiles | |
# directive in build.gradle. | |
# | |
# For more details, see | |
# http://developer.android.com/guide/developing/tools/proguard.html | |
# Add any project specific keep options here: | |
# If your project uses WebView with JS, uncomment the following | |
# and specify the fully qualified class name to the JavaScript interface | |
# class: | |
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | |
# public *; | |
#} | |
#standard proguard excludes based on this article > http://omgitsmgp.com/2013/09/09/a-conservative-guide-to-proguard-for-android/ | |
-keep public class * extends android.app.Activity | |
-keep public class * extends android.app.Application | |
-keep public class * extends android.app.Service | |
-keep public class * extends android.content.BroadcastReceiver | |
-keep public class * extends android.content.ContentProvider | |
-keep public class * extends android.preference.Preference | |
-keep public class com.android.vending.billing.IInAppBillingService | |
-keep public class * extends android.view.View { | |
public <init>(android.content.Context); | |
public <init>(android.content.Context, android.util.AttributeSet); | |
public <init>(android.content.Context, android.util.AttributeSet, int); | |
} | |
-keepclasseswithmembers class * { | |
public <init>(android.content.Context, android.util.AttributeSet); | |
} | |
-keepclasseswithmembers class * { | |
public <init>(android.content.Context, android.util.AttributeSet, int); | |
} | |
-keepclassmembers class * extends android.content.Context { | |
public void *(android.view.View); | |
public void *(android.view.MenuItem); | |
} | |
# exclude library projects that have already probably be proguarded | |
# from this article > http://www.crashlytics.com/blog/mastering-proguard-for-building-lightweight-android-code/ | |
-libraryjars libs | |
-keep class com.crashlytics.** { *; } | |
# add other libary packages here.... | |
# support libs too... | |
-keep class android.support.v4.app.** { *; } | |
-keep interface android.support.v4.app.** { *; } | |
# print mappings for analytics | |
-printseeds seeds.txt | |
-printusage unused.txt | |
-printmapping mapping.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment