Created
October 12, 2015 13:47
-
-
Save freakynit/06c18af5a48d5332a0b7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt | |
# You can edit the include path and order by changing the ProGuard | |
# include property in project.properties. | |
# | |
# 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 *; | |
#} | |
# Obfuscation parameters: | |
#-dontobfuscate | |
-useuniqueclassmembernames | |
-keepattributes SourceFile,LineNumberTable | |
-allowaccessmodification | |
# Ignore warnings: | |
#-dontwarn org.mockito.** | |
#-dontwarn org.junit.** | |
#-dontwarn com.robotium.** | |
#-dontwarn org.joda.convert.** | |
# Ignore warnings: We are not using DOM model | |
-dontwarn com.fasterxml.jackson.databind.ext.DOMSerializer | |
# Ignore warnings: https://github.com/square/okhttp/wiki/FAQs | |
-dontwarn com.squareup.okhttp.internal.huc.** | |
# Ignore warnings: https://github.com/square/okio/issues/60 | |
-dontwarn okio.** | |
# Ignore warnings: https://github.com/square/retrofit/issues/435 | |
-dontwarn com.google.appengine.api.urlfetch.** | |
# Keep the pojos used by GSON or Jackson | |
-keep class com.futurice.project.models.pojo.** { *; } | |
# Keep GSON stuff | |
-keep class sun.misc.Unsafe { *; } | |
-keep class com.google.gson.** { *; } | |
# Keep Jackson stuff | |
-keep class org.codehaus.** { *; } | |
-keep class com.fasterxml.jackson.annotation.** { *; } | |
# Keep these for GSON and Jackson | |
-keepattributes Signature | |
-keepattributes *Annotation* | |
-keepattributes EnclosingMethod | |
# Keep Retrofit | |
-keep class retrofit.** { *; } | |
-keepclasseswithmembers class * { | |
@retrofit.** *; | |
} | |
-keepclassmembers class * { | |
@retrofit.** *; | |
} | |
# Keep Picasso | |
-keep class com.squareup.picasso.** { *; } | |
-keepclasseswithmembers class * { | |
@com.squareup.picasso.** *; | |
} | |
-keepclassmembers class * { | |
@com.squareup.picasso.** *; | |
} | |
-keep class com.github.siyamed.shapeimageview.** { *; } | |
-keep interface com.github.siyamed.shapeimageview.** { *; } | |
-keep class org.kxml2.io.KXmlParser.** { *; } | |
-keep interface org.kxml2.io.KXmlParser.** { *; } | |
-keepattributes *Annotation* | |
-assumenosideeffects class android.util.Log { | |
public static *** d(...); | |
public static *** v(...); | |
} | |
-assumenosideeffects class android.util.Log { | |
public static *** d(...); | |
public static *** v(...); | |
} | |
-keepclassmembers class * { | |
public void onClickButton1(android.view.View); | |
public void onClickButton2(android.view.View); | |
public void onClickButton3(android.view.View); | |
} | |
-keepclasseswithmembernames class * { | |
native <methods>; | |
} | |
-keepclasseswithmembernames class * { | |
public <init>(android.content.Context, android.util.AttributeSet); | |
} | |
-keepclasseswithmembernames class * { | |
public <init>(android.content.Context, android.util.AttributeSet, int); | |
} | |
-keepclassmembers enum * { | |
public static **[] values(); | |
public static ** valueOf(java.lang.String); | |
} | |
-keep class * implements android.os.Parcelable { | |
public static final android.os.Parcelable$Creator *; | |
} | |
-optimizationpasses 5 | |
#When not preverifing in a case-insensitive filing system, such as Windows. Because this tool unpacks your processed jars, you should then use: | |
-dontusemixedcaseclassnames | |
#Specifies not to ignore non-public library classes. As of version 4.5, this is the default setting | |
-dontskipnonpubliclibraryclasses | |
#Preverification is irrelevant for the dex compiler and the Dalvik VM, so we can switch it off with the -dontpreverify option. | |
-dontpreverify | |
#Specifies to write out some more information during processing. If the program terminates with an exception, this option will print out the entire stack trace, instead of just the exception message. | |
-verbose | |
#The -optimizations option disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle. Note that the Dalvik VM also can't handle aggressive overloading (of static fields). | |
#To understand or change this check http://proguard.sourceforge.net/index.html#/manual/optimizations.html | |
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | |
#To repackage classes on a single package | |
#-repackageclasses '' | |
#Uncomment if using annotations to keep them. | |
#-keepattributes *Annotation* | |
#Keep classes that are referenced on the AndroidManifest | |
-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 com.android.vending.licensing.ILicensingService | |
#To remove debug logs: | |
-assumenosideeffects class android.util.Log { | |
public static *** d(...); | |
public static *** v(...); | |
} | |
#To avoid changing names of methods invoked on layout's onClick. | |
# Uncomment and add specific method names if using onClick on layouts | |
#-keepclassmembers class * { | |
# public void onClickButton(android.view.View); | |
#} | |
#Maintain java native methods | |
-keepclasseswithmembernames class * { | |
native <methods>; | |
} | |
#To maintain custom components names that are used on layouts XML. | |
#Uncomment if having any problem with the approach below | |
#-keep public class custom.components.package.and.name.** | |
#To maintain custom components names that are used on layouts XML: | |
-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); | |
public void set*(...); | |
} | |
-keepclasseswithmembers class * { | |
public <init>(android.content.Context, android.util.AttributeSet); | |
} | |
-keepclasseswithmembers class * { | |
public <init>(android.content.Context, android.util.AttributeSet, int); | |
} | |
#Maintain enums | |
-keepclassmembers enum * { | |
public static **[] values(); | |
public static ** valueOf(java.lang.String); | |
} | |
#To keep parcelable classes (to serialize - deserialize objects to sent through Intents) | |
-keep class * implements android.os.Parcelable { | |
public static final android.os.Parcelable$Creator *; | |
} | |
#Keep the R | |
-keepclassmembers class **.R$* { | |
public static <fields>; | |
} | |
###### ADDITIONAL OPTIONS NOT USED NORMALLY | |
#To keep callback calls. Uncomment if using any | |
#http://proguard.sourceforge.net/index.html#/manual/examples.html#callback | |
#-keep class mypackage.MyCallbackClass { | |
# void myCallbackMethod(java.lang.String); | |
#} | |
#Uncomment if using Serializable | |
#-keepclassmembers class * implements java.io.Serializable { | |
# private static final java.io.ObjectStreamField[] serialPersistentFields; | |
# private void writeObject(java.io.ObjectOutputStream); | |
# private void readObject(java.io.ObjectInputStream); | |
# java.lang.Object writeReplace(); | |
# java.lang.Object readResolve(); | |
#} | |
# The following rules are used to strip any non essential Google Play Services classes and method. | |
# For Google Play Services | |
-keep public class com.google.android.gms.ads.**{ | |
public *; | |
} | |
# For old ads classes | |
-keep public class com.google.ads.**{ | |
public *; | |
} | |
# For mediation | |
-keepattributes *Annotation* | |
# Other required classes for Google Play Services | |
# Read more at http://developer.android.com/google/play-services/setup.html | |
-keep class * extends java.util.ListResourceBundle { | |
protected Object[][] getContents(); | |
} | |
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { | |
public static final *** NULL; | |
} | |
-keepnames @com.google.android.gms.common.annotation.KeepName class * | |
-keepclassmembernames class * { | |
@com.google.android.gms.common.annotation.KeepName *; | |
} | |
-keepnames class * implements android.os.Parcelable { | |
public static final ** CREATOR; | |
} | |
-keepattributes | |
-dontoptimize | |
-dontobfuscate | |
# add all known-to-be-safely-shrinkable classes to the beginning of line below | |
-keep !com.android.support.**,!com.google.android.**,** { *; } | |
http://www.laurivan.com/my-proguard-configuration-base-file/ | |
-dontskipnonpubliclibraryclasses | |
-dontobfuscate | |
-forceprocessing | |
-optimizationpasses 5 | |
-keep class * extends android.app.Activity | |
-assumenosideeffects class android.util.Log { | |
public static *** d(...); | |
public static *** v(...); | |
} | |
-keep class com.facebook.** { *; } | |
-keep class com.androidquery.** { *; } | |
-keep class com.google.** { *; } | |
-keep class org.acra.** { *; } | |
-keep class org.apache.** { *; } | |
-keep class com.mobileapptracker.** { *; } | |
-keep class com.nostra13.** { *; } | |
-keep class net.simonvt.** { *; } | |
-keep class android.support.** { *; } | |
-keep class com.nnacres.app.model.** { *; } | |
# Suppress warnings if you are NOT using IAP: | |
-dontwarn com.nnacres.app.** | |
-dontwarn com.androidquery.** | |
-dontwarn com.google.** | |
-dontwarn org.acra.** | |
-dontwarn org.apache.** | |
-dontwarn com.mobileapptracker.** | |
-dontwarn com.nostra13.** | |
-dontwarn net.simonvt.** | |
-dontwarn android.support.** | |
-keepattributes Signature | |
# For using GSON @Expose annotation | |
-keepattributes *Annotation* | |
# Gson specific classes | |
-keep class sun.misc.Unsafe { *; } | |
#-keep class com.google.gson.stream.** { *; } | |
# The official support library. | |
#-keep class android.support.v4.app.** { *; } | |
#-keep interface android.support.v4.app.** { *; } | |
# Library JARs. | |
#-keep class de.greenrobot.dao.** { *; } | |
#-keep interface de.greenrobot.dao.** { *; } | |
# Library projects. | |
#-keep class com.actionbarsherlock.** { *; } | |
#-keep interface com.actionbarsherlock.** { *; } | |
-dontwarn org.apache.commons.** | |
-dontwarn com.google.** | |
-dontwarn com.j256.ormlite** | |
-dontwarn org.apache.http** | |
-keepattributes SourceFile,LineNumberTable | |
-keep class com.j256.** | |
-keepclassmembers class com.j256.** { *; } | |
-keep enum com.j256.** | |
-keepclassmembers enum com.j256.** { *; } | |
-keep interface com.j256.** | |
-keepclassmembers interface com.j256.** { *; } | |
-keepattributes Signature | |
# GSON Library | |
# For using GSON @Expose annotation | |
-keepattributes *Annotation* | |
# Gson specific classes | |
-keep class sun.misc.Unsafe { *; } | |
#-keep class com.google.gson.stream.** { *; } | |
# Application classes that will be serialized/deserialized over Gson | |
-keep class com.google.gson.examples.android.model.** { *; } | |
# Google Map | |
-keep class com.google.android.gms.maps.** { *; } | |
-keep interface com.google.android.gms.maps.** { *; } | |
-dontwarn android.support.v7.** | |
-keep class android.support.v7.** { *; } | |
-keep interface android.support.v7.** { *; } | |
-keep class android.support.v7.internal.** { *; } | |
-keep interface android.support.v7.internal.** { *; } | |
# Test methods | |
-keepclassmembers class * { | |
public void *test*(...); | |
} | |
# 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 *; | |
#} | |
-dontobfuscate | |
-keep class * extends java.util.ListResourceBundle { | |
protected Object[][] getContents(); | |
} | |
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { | |
public static final *** NULL; | |
} | |
-keepnames @com.google.android.gms.common.annotation.KeepName class * | |
-keepclassmembernames class * { | |
@com.google.android.gms.common.annotation.KeepName *; | |
} | |
-keepnames class * implements android.os.Parcelable { | |
public static final ** CREATOR; | |
} | |
# Add project specific ProGuard rules here. | |
# By default, the flags in this file are appended to flags specified | |
# in C:\Users\Florian\AppData\Local\Android\android-studio\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 *; | |
#} | |
# Allow obfuscation of android.support.v7.internal.view.menu.** | |
# to avoid problem on Samsung 4.2.2 devices with appcompat v21 | |
# see https://code.google.com/p/android/issues/detail?id=78377 | |
-keep class !android.support.v7.internal.view.menu.**,android.support.** {*;} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment