From db9ee4718395c1d0da92d45ed791a81548b99c8a Mon Sep 17 00:00:00 2001 From: Taras <tarassmakula@gmail.com> Date: Fri, 25 Feb 2022 20:53:54 +0200 Subject: [PATCH] Add proguard rules --- app/proguard-rules.pro | 55 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb4348..a38222339 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,57 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +## Okio start https://github.com/square/okio/blob/master/okio/src/jvmMain/resources/META-INF/proguard/okio.pro +# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java. +-dontwarn org.codehaus.mojo.animal_sniffer. +## Okio end + +## OkHttp start https://github.com/square/okhttp/blob/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro +# A resource is loaded with a relative path so the package of this class must be preserved. +-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase + +# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java. +-dontwarn org.codehaus.mojo.animal_sniffer.* + +# OkHttp platform used only on JVM and when Conscrypt dependency is available. +-dontwarn okhttp3.internal.platform.ConscryptPlatform +-dontwarn org.conscrypt.ConscryptHostnameVerifier +## OkHttp end + +## Glide start https://github.com/bumptech/glide +-keep public class * implements com.bumptech.glide.module.GlideModule +-keep class * extends com.bumptech.glide.module.AppGlideModule { + <init>(...); +} +-keep public enum com.bumptech.glide.load.ImageHeaderParser$** { + **[] $VALUES; + public *; +} +-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder { + *** rewind(); +} +## Glide end + +## Navigation component custom start +-keepclassmembers class * implements android.os.Parcelable { + public static final ** CREATOR; +} + +-keep class * implements android.os.Parcelable { +*; +} + +-keepnames class * implements android.os.Parcelable { + public static final ** CREATOR; +} + +-keep class * extends java.io.Serializable +## Navigation component custom end + +# RenderScript +-keepclasseswithmembernames class * { +native <methods>; +} +-keep class androidx.renderscript.** { *; } \ No newline at end of file -- GitLab