# 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

-optimizationpasses 5 # 指定代码的压缩级别
-dontoptimize
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-dontshrink
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,Annotation,EnclosingMethod

-keep public class * extends android.app.Fragment
-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.preference.Preference
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.view.View
-keep public class com.android.vending.licensing.ILicensingService

# 保护注解
-keepattributes *Annotation*
-keep class * extends java.lang.annotation.Annotation {*;}

#support
-keep class android.support.** {*;}
-dontwarn android.support.**
-keep interface android.support.** { *; }

#adnroidX
-keep class androidx.** {*;}
-keep interface androidx.** {*;}
-keep public class * extends androidx.**
-keep class com.google.android.material.** {*;}
-dontwarn androidx.**
-dontwarn com.google.android.material.**
-dontnote com.google.android.material.**

-keep public class * extends android.support.v4.**
-keep public class * extends android.support.annotation.**

-keep public class * extends android.view.View{
    *** get*();
    void set*(***);
    public <init>(android.content.Context);
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keep class **.R$* {*;}
-keepclassmembers class * extends android.app.Activity{
    public void *(android.view.View);
}
-keepclassmembers class * {
    void *(*Event);
}
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
-keepclasseswithmembernames class * {
    native <methods>;
}
-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    !static !transient <fields>;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

#避免webView混淆
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
    public *;
}
-keepclassmembers class * extends android.webkit.webViewClient {
    public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
    public boolean *(android.webkit.WebView, java.lang.String);
}
-keepclassmembers class * extends android.webkit.webViewClient {
    public void *(android.webkit.webView, jav.lang.String);
}
-keep public class [包名.类名]$[内部类]{
    public *;
}
-keepattributes JavascriptInterface

# OkHttp
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**
-keep class okhttp3.** { *; }
-dontwarn okhttp3.**
-keep class okhttp3.internal.**{*;}
# Okio
-keep class sun.misc.Unsafe{ *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
#Gson
-keep class com.google.gson.** {*;}
-keep class com.google.**{*;}
-keep class com.google.gson.stream.** { *; }
-keep class com.google.gson.examples.android.model.** { *; }

# retrofit2
-dontnote retrofit.Platform
-dontwarn retrofit.Platform$Java8
-dontwarn org.w3c.dom.Node
-keepattributes Exceptions
-dontwarn retrofit2.**
-dontwarn retrofit.appengine.UrlFetchClient
-keep class retrofit2.** { *; }
-keepclasseswithmembers class * {
    @retrofit.http.* <methods>;
}

# RxJava RxAndroid
-dontwarn sun.misc.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
    long producerIndex;
    long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
    rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
    rx.internal.util.atomic.LinkedQueueNode consumerNode;
}

-keep class java.beans.** { *; }

#文件里面有xml 需要增加配置
-keep class org.xmlpull.** {*;}
-keep public class * extends org.xmlpull.**
-keep interface org.xmlpull.** {*;}



-keep class com.miya.** { *; }
-keep class com.miya.fastcashier.dao.** { *; }
-keep class com.miya.fastcashier.log.** { *; }
-keep class com.miya.fastcashier.net.** { *; }
-keep class com.fastcashier.** { *; }

-keep class com.google.** { *; }
# 米雅jar支付
-keep class com.sdy.miya.moblie.component.pay.jar.bean.** { *; }
-keep class com.sdy.miya.moblie.component.pay.core.** { *; }
-keep class com.sdy.miya.moblie.component.pay.midhub.bean.** { *; }
-keep class com.sdy.miya.moblie.component.pay.midhub.sign.** { *; }
-keep class com.sdy.miya.moblie.component.pay.platform.bean.** { *; }
-keep class com.miya.** { *; }
-keep class com.sdy.miya.moblie.component.pay.platform.MiYaPlatformPayService{
 public *;
}
-keep class com.sdy.miya.moblie.component.pay.midhub.MiYaMidHubPayService{
 public *;
}
-keep class com.sdy.miya.moblie.component.pay.jar.MiYaJarPayService{
 public *;
}
-keep class MiYaPayMobileApiClient{
public *;
}