# 将所有的 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.voice'

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


#--------------------------2.第三方包-------------------------------
#Gson
-keepattributes Signature
-keepattributes *Annotation*
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.stream.** { *; }
-keep class com.google.gson.* { *;}
-dontwarn com.google.gson.**

-keep class io.socket.**{*;}
-keep class com.zhy.**{*;}
-keep class commons-codec.**{*;}

-keepclassmembers class * {
    @org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }

# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
    <init>(java.lang.Throwable);
}


#保持以下类不被混淆
-keep class com.ss.video.rtc.engine.RtcEngine {*;}
-keep class com.ss.video.rtc.engine.Constants {*;}
-keep class com.ss.video.rtc.engine.VideoCanvas {*;}
-keep class com.ss.video.rtc.engine.handler.{*;}
-keep class com.ss.video.**{*;}
-keep class org.webrtc.**{*;}
-keep class com.bytedance.webrtc.**{*;}
-keep class com.bytedance.realx.**{*;}
-keep class com.bytedance.bae.**{*;}
-keep class com.bytertc.base.**{*;}

#保持声网的类不被混淆
-dontwarn dontwarnio.agora.rtc.internal.RtcEngineImpl
-keep class io.agora.rtc.internal.RtcEngineImpl { *;}
-keep class io.agora.rtc.internal.RtcEngineEvent { *;}
-keep class io.agora.rtc.Constants { *;}
-keep class io.agora.rtc.audio.** { *;}
-keep class io.agora.rtc.video.** { *;}
-keep class io.agora.rtc.mediaio.** { *;}
-keep class com.bytedance.webrtc.**{*;}
#-keep class com.koushikdutta.async.**{*;}
#-keep class org.webrtc.org.webrtc.voiceengine.**{*;}

-keep class com.bytedance.speech.speechengine.SpeechEngine {*;}
-keep class com.bytedance.speech.speechengine.SpeechEngine$SpeechListener {*;}
-keep class com.bytedance.ttgame.module.asr.entity.RecognitionResult {*;}
-keep class com.bytedance.ttgame.module.asr.entity.RecognitionResult$ResultBean {*;}


-keep class g.optional.voice.** {*;}
-keep class org.webrtc.**{*;}
-keep class com.ss.video.**{*;}



