# 将所有的 IService 子类 keep 住，因为 spi 会自动查找
-keep class * implements com.bytedance.ttgame.framework.module.spi.IService {*;}
# 将所有的 ModuleLifecycle 子类 keep 住，因为 ModuleManager 会查找
-keep class * implements com.bytedance.ttgame.framework.module.spi.ModuleLifecycle {*;}
# 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

# 这个非常重要，控制我们混淆产出的包名，防止与其它三方sdk出现包名冲突
-repackageclasses 'g.optional.push'

-dontshrink
-ignorewarnings
-dontpreverify
-dontoptimize
-optimizations !class/unboxing/enum
-optimizations !code/simplification/arithmetic
-keeppackagenames doNotKeepAThing
-keepattributes SourceFile, LineNumberTable

-keep class * implements com.bytedance.ttgame.framework.module.spi.IService {*;}

-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

#push 主工程
-keepnames class org.msgpack.MessageTypeException.** {*;}
-keepnames class org.msgpack.packer.** {*;}
-keepnames class org.msgpack.template.** {*;}
-keepnames class org.msgpack.type.** {*;}
-keepnames class org.msgpack.unpacker.** {*;}
-keepnames class org.msgpack.MessagePack.** {*;}
-dontwarn org.msgpack.**
-ignorewarnings

-keep interface com.ss.android.pushmanager.thirdparty.I* {*;}
-keep class * implements com.ss.android.pushmanager.thirdparty.IPushAdapter {*;}
-keep class * implements com.ss.android.pushmanager.thirdparty.IPushDepend {*;}

-keep interface com.ss.android.pushmanager.IMessageAppAdapter {*;}
-keep class * implements com.ss.android.pushmanager.IMessageAppAdapter {*;}

# 友盟 PUSH STATR
-dontwarn com.taobao.**
-dontwarn anet.channel.**
-dontwarn anetwork.channel.**
-dontwarn org.android.**
-dontwarn org.apache.thrift.**
-dontwarn com.xiaomi.**
-dontwarn com.huawei.**
-dontwarn com.alibaba.sdk.android.**
-dontwarn com.ut.**
-dontwarn com.hianalytics.**

-keepattributes *Annotation*

-keep class com.taobao.** {*;}
-keep class org.android.** {*;}
-keep class anet.channel.** {*;}
-keep class com.umeng.** {*;}
-keep class com.xiaomi.** {*;}
-keep class com.huawei.** {*;}
-keep class org.apache.thrift.** {*;}
-keep class anetwork.channel.** {*;}

-keep class com.alibaba.sdk.android.**{*;}
-keep class com.ut.**{*;}
-keep class com.ta.**{*;}
-keep class com.hianalytics.**{*;}

-keep public class **.R$*{
   public static final int *;
}
# 友盟 PUSH END


# 阿里 PUSH STARTD
-keep class com.aliyun.**{*;}
# 阿里 PUSH END


# 小米 PUSH STATR
-keep class com.google.protobuf.micro.** {*;}
-keep class com.xiaomi.** {*;}
-dontwarn com.xiaomi.**
-keep class org.apache.thrift.** {*;}
-dontwarn org.apache.thrift.**
# 小米 PUSH END


# 魅族 PUSH STATR
# for google protobuf
-keep public class * extends com.google.protobuf.GeneratedMessage { *; }
-keep class com.google.protobuf.** { *; }
-keep public class * extends com.google.protobuf.** { *; }

#for okhttp
-keep class okio.** {*;}
-dontwarn okio.**
-keep class com.squareup.okhttp.** {*;}
-dontwarn com.squareup.okhttp.**

# for push sdk
-keep class com.meizu.** {*;}
-dontwarn com.meizu.**

-keep class com.ss.android.push.third.**{*;}
-keep class com.squareup.okio.**{*;}
-keep class com.squareup.okhttp3.**{*;}

-dontwarn com.squareup.okio.**
-dontwarn com.squareup.okhttp3.**
-dontwarn com.ss.android.push.third.**
# 魅族 PUSH END

# OPPO PUSH STATR
-keep class com.coloros.**{*;}
-dontwarn com.coloros.**
-keep public class * extends android.app.Service
# OPPO PUSH END

#华为 PUSH STATR
-keep class com.huawei.** {*;}
-dontwarn com.huawei.**
#华为 PUSH END


#-dontwarn org.msgpack.**
#-dontwarn com.ss.android.usergrowth.**
-keep class com.ss.android.push.PushDependManager{*;}


# keep 自己定义的 AliyunMessageReceiver 和 MzMessageReceiver
-keep public class * extends com.aliyun.AliyunMessageReceiver { *; }
-keep public class * extends com.meizu.message.MzMessageReceiver { *; }

# VIVO push
-dontwarn com.vivo.push.**
-keep class com.vivo.push.**{*; }
-keep class com.vivo.VivoPushMessageReceiver{*;}

# keep SettingsManager, 否则 NoClassFoundError
-keep class com.bytedance.push.settings.SettingsManager{*;}
-keep class g.optional.push.** {*;}

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/chenzhiyong/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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
#自动添加了 proguard 规则，无需再次添加
-keep class com.fcm.service.FcmRegistrationJobIntentService{*;}
-keep class com.fcm.service.SSGcmListenerService{*;}
-keep class com.fcm.FcmPushAdapter{*;}
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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 *;
#}



-keepnames class org.msgpack.MessageTypeException.** {*;}
-keepnames class org.msgpack.packer.** {*;}
-keepnames class org.msgpack.template.** {*;}
-keepnames class org.msgpack.type.** {*;}
-keepnames class org.msgpack.unpacker.** {*;}
-keepnames class org.msgpack.MessagePack.** {*;}
-dontwarn org.msgpack.**

-keep interface com.ss.android.pushmanager.thirdparty.I* {*;}
-keep class * implements com.bytedance.push.third.IPushAdapter {*;}

-keep interface com.ss.android.pushmanager.IMessageAppAdapter {*;}
-keep class * implements com.ss.android.pushmanager.IMessageAppAdapter {*;}
-keep class android.os.SystemProperties {*;}
-dontwarn android.os.SystemProperties

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/chenzhiyong/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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


-keep interface com.bytedance.push.settings.ISettings {*;}
-keep class * implements com.bytedance.push.settings.ISettings {
    public <init>(...);
}
-keep interface com.bytedance.push.settings.ILocalSettings {*;}
-keep class * implements com.bytedance.push.settings.ILocalSettings {
    public <init>(...);
}
