274 lines
9.4 KiB
Prolog
274 lines
9.4 KiB
Prolog
# Add project specific ProGuard rules here.
|
|
# You can control the set of applied configuration files using the
|
|
# proguardFiles setting in build.gradle.
|
|
#
|
|
# For more details, see
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
|
|
# 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 *;
|
|
#}
|
|
|
|
# Uncomment this to preserve the line number information for
|
|
# debugging stack traces.
|
|
#-keepattributes SourceFile,LineNumberTable
|
|
|
|
# If you keep the line number information, uncomment this to
|
|
# hide the original source file name.
|
|
#-renamesourcefileattribute SourceFile
|
|
|
|
|
|
|
|
-dontwarn android.databinding.**
|
|
-keep class android.databinding.** { *; }
|
|
|
|
|
|
# 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 *;}
|
|
|
|
|
|
##---------------Begin: proguard configuration for Retrofit ----------
|
|
|
|
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
|
|
# EnclosingMethod is required to use InnerClasses.
|
|
-keepattributes Signature, InnerClasses, EnclosingMethod
|
|
|
|
# Retrofit does reflection on method and parameter annotations.
|
|
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
|
|
|
|
# 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
|
|
|
|
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
|
|
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
|
|
-if interface * { @retrofit2.http.* <methods>; }
|
|
-keep,allowobfuscation interface <1>
|
|
##---------------End: proguard configuration for Retrofit ----------
|
|
|
|
|
|
|
|
|
|
##---------------Begin: proguard configuration for Gson ----------
|
|
# Gson uses generic type information stored in a class file when working with fields. Proguard
|
|
# removes such information by default, so configure it to keep all of it.
|
|
-keepattributes Signature
|
|
|
|
# For using GSON @Expose annotation
|
|
-keepattributes Annotation
|
|
|
|
# Gson specific classes
|
|
-dontwarn sun.misc.**
|
|
-keep class com.google.gson.stream.** { *; }
|
|
|
|
# Application classes that will be serialized/deserialized over Gson
|
|
-keep class com.coaching.data.** { *; }
|
|
|
|
# Prevent proguard from stripping interface information from TypeAdapterFactory,
|
|
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
|
-keep class * implements com.google.gson.TypeAdapterFactory
|
|
-keep class * implements com.google.gson.JsonSerializer
|
|
-keep class * implements com.google.gson.JsonDeserializer
|
|
|
|
##---------------End: proguard configuration for Gson ----------
|
|
|
|
|
|
|
|
# JSR 305 annotations are for embedding nullability information.
|
|
-dontwarn javax.annotation.**
|
|
|
|
# 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
|
|
|
|
|
|
##---------------Begin: proguard configuration for Glide ----------
|
|
-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
|
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
|
**[] $VALUES;
|
|
public *;
|
|
}
|
|
|
|
##---------------End: proguard configuration for Glide ----------
|
|
|
|
|
|
##---------------Begin: proguard configuration for Jitsi ----------
|
|
|
|
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
|
|
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
|
|
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
|
|
|
|
# Do not strip any method/class that is annotated with @DoNotStrip
|
|
-keep @com.facebook.proguard.annotations.DoNotStrip class *
|
|
-keep @com.facebook.common.internal.DoNotStrip class *
|
|
-keepclassmembers class * {
|
|
@com.facebook.proguard.annotations.DoNotStrip *;
|
|
@com.facebook.common.internal.DoNotStrip *;
|
|
}
|
|
|
|
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
|
|
void set*(***);
|
|
*** get*();
|
|
}
|
|
|
|
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
|
|
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
|
|
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
|
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
|
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
|
|
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
|
|
|
|
-dontwarn com.facebook.react.**
|
|
-keep,includedescriptorclasses class com.facebook.react.bridge.** { *; }
|
|
|
|
# okhttp
|
|
|
|
-keepattributes Signature
|
|
-keepattributes *Annotation*
|
|
-keep class okhttp3.** { *; }
|
|
-keep interface okhttp3.** { *; }
|
|
-dontwarn okhttp3.**
|
|
|
|
# okio
|
|
|
|
-keep class sun.misc.Unsafe { *; }
|
|
-dontwarn java.nio.file.*
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
|
-keep class okio.** { *; }
|
|
-dontwarn okio.**
|
|
|
|
# WebRTC
|
|
|
|
-keep class org.webrtc.** { *; }
|
|
-dontwarn org.chromium.build.BuildHooksAndroid
|
|
|
|
# Jisti Meet SDK
|
|
|
|
-keep class org.jitsi.meet.** { *; }
|
|
-keep class org.jitsi.meet.sdk.** { *; }
|
|
|
|
# We added the following when we switched minifyEnabled on. Probably because we
|
|
# ran the app and hit problems...
|
|
|
|
-keep class com.facebook.react.bridge.CatalystInstanceImpl { *; }
|
|
-keep class com.facebook.react.bridge.ExecutorToken { *; }
|
|
-keep class com.facebook.react.bridge.JavaScriptExecutor { *; }
|
|
-keep class com.facebook.react.bridge.ModuleRegistryHolder { *; }
|
|
-keep class com.facebook.react.bridge.ReadableType { *; }
|
|
-keep class com.facebook.react.bridge.queue.NativeRunnable { *; }
|
|
-keep class com.facebook.react.devsupport.** { *; }
|
|
|
|
-dontwarn com.facebook.react.devsupport.**
|
|
-dontwarn com.google.appengine.**
|
|
-dontwarn com.squareup.okhttp.**
|
|
-dontwarn javax.servlet.**
|
|
|
|
# ^^^ We added the above when we switched minifyEnabled on.
|
|
|
|
# Rule to avoid build errors related to SVGs.
|
|
-keep public class com.horcrux.svg.** {*;}
|
|
|
|
# Hermes
|
|
-keep class com.facebook.hermes.unicode.** { *; }
|
|
|
|
##---------------End: proguard configuration for Jitsi ----------
|
|
|
|
|
|
##---------------Begin: proguard configuration for RazorPay ----------
|
|
-keepclassmembers class * {
|
|
@android.webkit.JavascriptInterface <methods>;
|
|
}
|
|
|
|
-keepattributes JavascriptInterface
|
|
-keepattributes *Annotation*
|
|
|
|
-dontwarn com.razorpay.**
|
|
-keep class com.razorpay.** {*;}
|
|
|
|
-optimizations !method/inlining/*
|
|
|
|
-keepclasseswithmembers class * {
|
|
public void onPayment*(...);
|
|
}
|
|
##---------------End: proguard configuration for RazorPay ----------
|
|
|
|
##---------------Start: proguard configuration for picker ----------
|
|
# Glide
|
|
-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
|
**[] $VALUES;
|
|
public *;
|
|
}
|
|
# support-v7-appcompat
|
|
-keep public class android.support.v7.widget.** { *; }
|
|
-keep public class android.support.v7.internal.widget.** { *; }
|
|
-keep public class android.support.v7.internal.view.menu.** { *; }
|
|
-keep public class * extends android.support.v4.view.ActionProvider {
|
|
public <init>(android.content.Context);
|
|
}
|
|
# support-design
|
|
-dontwarn android.support.design.**
|
|
-keep class android.support.design.** { *; }
|
|
-keep interface android.support.design.** { *; }
|
|
-keep public class android.support.design.R$* { *; }
|
|
##---------------End: proguard configuration for Picker ----------
|
|
|
|
##---------------Begin: proguard configuration for image picker ----------
|
|
# 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();
|
|
}
|
|
|
|
# Uncomment for DexGuard only
|
|
#-keepresourcexmlelements manifest/application/meta-data@value=GlideModule
|
|
|
|
##---------------End: proguard configuration for image picker ----------
|
|
|
|
##---------------Begin: proguard configuration for threetenabp ----------
|
|
|
|
# Keep class members used for serialization
|
|
# https://www.guardsquare.com/en/products/proguard/manual/examples#serializable
|
|
-keepclassmembers class org.threeten.bp.** 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();
|
|
|
|
}
|
|
##---------------End: proguard configuration for threetenabp ----------
|
|
|
|
|