Created
May 18, 2020 18:57
-
-
Save am3n/92098102533f8971da52265387744320 to your computer and use it in GitHub Desktop.
Proguard rules debug/release for all projects
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
... | |
buildTypes { | |
debug { | |
debuggable true | |
minifyEnabled true | |
shrinkResources true | |
... | |
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), | |
'PathToProjectsDir\\proguard-rules-debug.pro' | |
} | |
release { | |
debuggable false | |
minifyEnabled true | |
shrinkResources true | |
... | |
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), | |
'PathToProjectsDir\\proguard-rules-release.pro' | |
} | |
} | |
... |
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
#-assumenosideeffects class android.util.Log { | |
# public static boolean isLoggable(java.lang.String, int); | |
# public static *** v(...); | |
# public static *** i(...); | |
# public static *** w(...); | |
# public static *** d(...); | |
# public static *** e(...); | |
#} | |
#-assumenosideeffects class java.io.PrintStream { | |
# public void println(...); | |
# public void print(...); | |
#} | |
#-assumenosideeffects class java.lang.Throwable { | |
# public void printStackTrace(...); | |
#} | |
-keepattributes *Annotation* | |
-keepattributes SourceFile,LineNumberTable | |
-keep public class * extends java.lang.Exception | |
-keep class com.crashlytics.** { *; } | |
-dontwarn com.crashlytics.** | |
-keep class ir.am3n.craptionreporter.** { *; } | |
# for Screenshot.kt | |
-keepclassmembers class rx.internal.util.unsafe.** { | |
long producerIndex; | |
long consumerIndex; | |
} | |
-keep class rx.internal.util.unsafe.** { *; } | |
-keep class rx.schedulers.Schedulers { | |
public static <methods>; | |
} | |
-keep class rx.schedulers.ImmediateScheduler { | |
public <methods>; | |
} | |
-keep class rx.schedulers.TestScheduler { | |
public <methods>; | |
} | |
-keep class rx.schedulers.Schedulers { | |
public static ** test(); | |
} | |
-dontwarn junit.awtui.** | |
-dontwarn junit.swingui.** | |
-dontwarn android.test.** | |
-dontwarn com.google.android.gms.auth.** | |
-dontwarn junit.runner.** | |
-keep class org.osmdroid.** { *; } | |
-dontwarn org.osmdroid.** | |
-keep class org.neshan.** {*;} | |
-keep class com.google.android.gms.** { *; } | |
-dontwarn com.google.android.gms.** | |
-dontwarn okio.** | |
-dontwarn okhttp3.internal.platform.* | |
-dontwarn okhttp3.internal.platform.* | |
-dontwarn okhttp3.internal.platform.** | |
-keep class okhttp3.** { *; } | |
-keep interface okhttp3.** { *; } | |
-dontwarn com.squareup.okhttp3.** | |
-keep class com.squareup.okhttp3.** { *; } | |
-keep interface com.squareup.okhttp3.** { *; } | |
-dontwarn javax.annotation.Nullable | |
-dontwarn javax.annotation.ParametersAreNonnullByDefault | |
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase | |
-dontwarn okhttp3.** | |
-dontwarn org.conscrypt.** | |
-keepclassmembers,allowobfuscation class * { | |
@com.google.gson.annotations.SerializedName <fields>; | |
} | |
# Retrofit does reflection on generic parameters and InnerClass is required to use Signature. | |
-keepattributes Signature, InnerClasses | |
# Retain service method parameters when optimizing. | |
-keepclassmembers,allowshrinking,allowobfuscation interface * { | |
@retrofit2.http.* <methods>; | |
} | |
# Ignore annotation used for build tooling. | |
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement | |
# Ignore JSR 305 annotations for embedding nullability information. | |
-dontwarn javax.annotation.** | |
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath. | |
-dontwarn kotlin.Unit | |
# Top-level functions that can only be used by Kotlin. | |
-dontwarn retrofit2.-KotlinExtensions | |
#-keep class com.saco.hamsi.MsvAuthority | |
#-keepclassmembers class com.saco.hamsi.MsvAuthority.** { *; } | |
#-keep class com.saco.simorghattar.MsvAuthority | |
#-keepclassmembers class com.saco.simorghattar.MsvAuthority.** { *; } | |
-keep class com.amirhosein.loadingview.** { *; } | |
-keep class com.amirhosein.loadingview.Indicators.** { *; } | |
-keep class com.shockwave.** | |
-keepclassmembers enum * { *; } | |
-keep class com.google.gson.examples.android.model.** { *; } | |
-keep class com.google.gson.** { *; } | |
-keep class com.google.maps.model.LatLng.** { *; } | |
-keep class com.google.maps.** { *; } | |
-keep class com.google.android.gms.maps.** { *; } | |
-keep interface com.google.android.gms.maps.** { *; } | |
-keepnames class com.google.android.maps.** {*;} | |
-keep public class com.google.android.maps.** {*;} | |
-keep class com.google.appengine.GaeRequestHandler.** { *; } | |
-keep class com.google.appengine.api.urlfetch.URLFetchServiceFactory.** { *; } | |
-dontwarn com.google.appengine.** | |
-keep class org.joda.time.** {*;} | |
-keep class org.joda.** { *; } | |
-dontwarn org.joda.time.** | |
-dontwarn org.joda.convert.** | |
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
-assumenosideeffects class android.util.Log { | |
public static boolean isLoggable(java.lang.String, int); | |
public static *** v(...); | |
public static *** i(...); | |
public static *** w(...); | |
public static *** d(...); | |
public static *** e(...); | |
} | |
-assumenosideeffects class java.io.PrintStream { | |
public void println(...); | |
public void print(...); | |
} | |
#-assumenosideeffects class java.lang.Throwable { | |
# public void printStackTrace(...); | |
#} | |
-keepattributes *Annotation* | |
-keepattributes SourceFile,LineNumberTable | |
-keep public class * extends java.lang.Exception | |
-keep class com.crashlytics.** { *; } | |
-dontwarn com.crashlytics.** | |
-keep class ir.am3n.craptionreporter.** { *; } | |
# for Screenshot.kt | |
-keepclassmembers class rx.internal.util.unsafe.** { | |
long producerIndex; | |
long consumerIndex; | |
} | |
-keep class rx.internal.util.unsafe.** { *; } | |
-keep class rx.schedulers.Schedulers { | |
public static <methods>; | |
} | |
-keep class rx.schedulers.ImmediateScheduler { | |
public <methods>; | |
} | |
-keep class rx.schedulers.TestScheduler { | |
public <methods>; | |
} | |
-keep class rx.schedulers.Schedulers { | |
public static ** test(); | |
} | |
-dontwarn junit.awtui.** | |
-dontwarn junit.swingui.** | |
-dontwarn android.test.** | |
-dontwarn com.google.android.gms.auth.** | |
-dontwarn junit.runner.** | |
-keep class org.osmdroid.** { *; } | |
-dontwarn org.osmdroid.** | |
-keep class org.neshan.** {*;} | |
-keep class com.google.android.gms.** { *; } | |
-dontwarn com.google.android.gms.** | |
-dontwarn okio.** | |
-dontwarn okhttp3.internal.platform.* | |
-dontwarn okhttp3.internal.platform.* | |
-dontwarn okhttp3.internal.platform.** | |
-keep class okhttp3.** { *; } | |
-keep interface okhttp3.** { *; } | |
-dontwarn com.squareup.okhttp3.** | |
-keep class com.squareup.okhttp3.** { *; } | |
-keep interface com.squareup.okhttp3.** { *; } | |
-dontwarn javax.annotation.Nullable | |
-dontwarn javax.annotation.ParametersAreNonnullByDefault | |
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase | |
-dontwarn okhttp3.** | |
-dontwarn org.conscrypt.** | |
-keepclassmembers,allowobfuscation class * { | |
@com.google.gson.annotations.SerializedName <fields>; | |
} | |
# Retrofit does reflection on generic parameters and InnerClass is required to use Signature. | |
-keepattributes Signature, InnerClasses | |
# Retain service method parameters when optimizing. | |
-keepclassmembers,allowshrinking,allowobfuscation interface * { | |
@retrofit2.http.* <methods>; | |
} | |
# Ignore annotation used for build tooling. | |
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement | |
# Ignore JSR 305 annotations for embedding nullability information. | |
-dontwarn javax.annotation.** | |
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath. | |
-dontwarn kotlin.Unit | |
# Top-level functions that can only be used by Kotlin. | |
-dontwarn retrofit2.-KotlinExtensions | |
#-keep class com.saco.hamsi.MsvAuthority | |
#-keepclassmembers class com.saco.hamsi.MsvAuthority.** { *; } | |
#-keep class com.saco.simorghattar.MsvAuthority | |
#-keepclassmembers class com.saco.simorghattar.MsvAuthority.** { *; } | |
-keep class com.amirhosein.loadingview.** { *; } | |
-keep class com.amirhosein.loadingview.Indicators.** { *; } | |
-keep class com.shockwave.** | |
-keepclassmembers enum * { *; } | |
-keep class com.google.gson.examples.android.model.** { *; } | |
-keep class com.google.gson.** { *; } | |
-keep class com.google.maps.model.LatLng.** { *; } | |
-keep class com.google.maps.** { *; } | |
-keep class com.google.android.gms.maps.** { *; } | |
-keep interface com.google.android.gms.maps.** { *; } | |
-keepnames class com.google.android.maps.** {*;} | |
-keep public class com.google.android.maps.** {*;} | |
-keep class com.google.appengine.GaeRequestHandler.** { *; } | |
-keep class com.google.appengine.api.urlfetch.URLFetchServiceFactory.** { *; } | |
-dontwarn com.google.appengine.** | |
-keep class org.joda.time.** {*;} | |
-keep class org.joda.** { *; } | |
-dontwarn org.joda.time.** | |
-dontwarn org.joda.convert.** | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment