-keep class com.hihonor.secure.android.common.** {*;}


-keepattributes SourceFile,LineNumberTable  # 保留行号
-keepattributes *Annotation*,Signature # 避免混淆注解、泛型

#--------------------------------------------------------------------------------------自定义配置-----------------------------
# 将所有类文件全部归纳到同一个包名下，可以有效避免通过包名去反向检索代码
#-repackageclasses

#保留联运SDK的包路径
-keeppackagenames com.hihonor.*


#------------------------------------------------------------------------------------通用公共业务配置-------------------------------
# Parcelable实现类中的CREATOR字段不能改变，包括大小写
-keepclassmembers class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator CREATOR;
}

#保持所有实现 Serializable 接口的类成员
-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    !static !transient <fields>;
    !private <fields>;
    !private <methods>;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

# 保留native方法的类名和方法名
-keepclasseswithmembernames class * {
    native <methods>;
}

# Understand the @Keep support annotation. -- androidx
-keep class androidx.annotation.Keep
-keep @androidx.annotation.Keep class * {*;}
# 防止拥有该成员的类和类成员被移除或被混淆；
-keepclasseswithmembers class * {
    @androidx.annotation.Keep <init>(...);
    @androidx.annotation.Keep <fields>;
    @androidx.annotation.Keep <methods>;
}

#Fragment不需要在AndroidManifest.xml中注册，需要额外保护下
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment

# 保留四大组件，自定义的Application等这些类不被混淆
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
# 保留在Activity中的方法参数是view的方法，
# 这样以来我们在layout中写的onClick就不会被影响
-keepclassmembers class * extends android.app.Activity{
    public void *(android.view.View);
}

# 保留枚举类不被混淆
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

#-------------------------------------------------------------------------------联运业务特有配置 三方包-------------------------------

#公司安全检测库需要 - com.hihonor.cloudservice.security:security-detect:xxx
-keep class com.hihonor.secure.android.common.** {*;}

## Gson配置
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class com.google.gson.stream.** { *; }
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer


#保证所有的占位代理类不被混淆； --- 插件化
-keep class com.hihonor.appmarketjointsdk.sdk.proxy.**{*;}

-keep class com.hihonor.appmarketjointsdk.androidx.**{ *;}
-keep @com.hihonor.appmarketjointsdk.androidx.annotation.Keep class * {*;}
-keepclasseswithmembers class * {
    @com.hihonor.appmarketjointsdk.androidx.annotation.Keep <init>(...);
    @com.hihonor.appmarketjointsdk.androidx.annotation.Keep <fields>;
    @com.hihonor.appmarketjointsdk.androidx.annotation.Keep <methods>;
}

-keep class androidx.constraintlayout.widget.Guideline {*;}

#------------------------------------------------------------------------------------实体类bean-----------------------------------------------
-keep class com.hihonor.appmarketjointsdk.bean.**{ *;}
-keep class com.hihonor.appmarketjointsdk.bean.**$*{ *;}
-keep class com.hihonor.appmarketjointsdk.callback.**{ *;}
-keep class com.hihonor.appmarketjointsdk.callback.**$*{ *;}
-keep class com.hihonor.appmarketjointsdk.cons.**{*;}
-keep class com.hihonor.appmarketjointsdk.cons.**$*{*;}
























