app 类调整
This commit is contained in:
parent
80b4e66aca
commit
255f5223e8
|
|
@ -141,7 +141,7 @@
|
|||
# 这将保护该包(及其子包)下所有类的类名、字段名和方法名不被更改。
|
||||
|
||||
-keep class com.gamedog.vididin.beans.** { *; }
|
||||
-keep class com.gamedog.vididin.VidiDinApp
|
||||
-keep class com.viddin.videos.free.VidiDinApp
|
||||
|
||||
|
||||
# 如果模型类实现了Serializable接口,建议额外保留序列化版本UID和特定方法
|
||||
|
|
@ -158,6 +158,46 @@
|
|||
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Hilt 核心规则
|
||||
# --------------------------------------------------
|
||||
|
||||
# 保留 Hilt 的注解处理器生成的类
|
||||
-keep class dagger.hilt.internal.aggregatedroot.** { *; }
|
||||
-keep class hilt_aggregated_deps.** { *; }
|
||||
|
||||
# 保留使用 @AndroidEntryPoint 注解的 Android 组件(Activity, Fragment, View, Service, BroadcastReceiver)
|
||||
-keep class * extends android.app.Application { @dagger.hilt.android.AndroidEntryPoint <init>(); }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <fields>; }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <methods>; }
|
||||
|
||||
# 保留 Hilt 模块类,确保依赖提供逻辑不被混淆
|
||||
-keep @dagger.Module class *
|
||||
-keep @dagger.hilt.InstallIn class *
|
||||
|
||||
# 保留 Hilt 入口点(EntryPoint)相关的类
|
||||
-keep @dagger.hilt.EntryPoint class *
|
||||
-keepclassmembers @dagger.hilt.EntryPoint class * { *; }
|
||||
|
||||
# 保留 Hilt 生成的组件(Component)相关类
|
||||
-keep @dagger.hilt.components.SingletonComponent class *
|
||||
-keepclassmembers @dagger.hilt.components.SingletonComponent class * { *; }
|
||||
|
||||
# 保留 Hilt 处理器生成的工厂类
|
||||
-keep class * extends dagger.internal.Binding { *; }
|
||||
-keep class * extends dagger.internal.Factory { *; }
|
||||
-keep class * implements dagger.MembersInjector { *; }
|
||||
-keep class * implements dagger.Lazy { *; }
|
||||
|
||||
# 保留泛型信息,这对依赖注入很关键
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
|
||||
# 保留注解信息(Hilt 严重依赖注解)
|
||||
-keepattributes *Annotation*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##############加密混淆###########
|
||||
########腾讯X5内核浏览器中的的代码不被混淆#####
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
|
||||
<application
|
||||
android:name="com.gamedog.vididin.VidiDinApp"
|
||||
android:name=".VidiDinApp"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
|||
|
|
@ -1,33 +1,27 @@
|
|||
package com.gamedog.vididin
|
||||
package com.viddin.videos.free
|
||||
|
||||
import com.ama.core.architecture.BaseApp
|
||||
import com.gamedog.statisticreporter.adjust.AdjustManager
|
||||
import com.gamedog.statisticreporter.firbase.FireBaseManager
|
||||
import com.gamedog.statisticreporter.shushu.ShushuManager
|
||||
import com.gamedog.vididin.VidiConst
|
||||
import com.gamedog.vididin.core.login.login.AccountManager
|
||||
import com.gamedog.vididin.manager.TaskManager
|
||||
import com.google.firebase.FirebaseApp
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
||||
|
||||
@HiltAndroidApp
|
||||
class VidiDinApp : BaseApp() {
|
||||
|
||||
init {
|
||||
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
override fun customOnCreate() {
|
||||
initManagers()
|
||||
}
|
||||
|
||||
private fun initManagers() {
|
||||
AccountManager.getAccount()
|
||||
TaskManager.instance().initNotificationData()
|
||||
TaskManager.instance()
|
||||
ShushuManager.instance().initShushu(VidiConst.SHUSHU_APP_ID, VidiConst.SHUSHU_SERVER_URL)
|
||||
FireBaseManager.instance()
|
||||
AdjustManager.instance().initSdk(VidiConst.ADJUST_TOKEN)
|
||||
TaskManager.Companion.instance().initNotificationData()
|
||||
TaskManager.Companion.instance()
|
||||
ShushuManager.Companion.instance().initShushu(VidiConst.SHUSHU_APP_ID, VidiConst.SHUSHU_SERVER_URL)
|
||||
FireBaseManager.Companion.instance()
|
||||
AdjustManager.Companion.instance().initSdk(VidiConst.ADJUST_TOKEN)
|
||||
}
|
||||
}
|
||||
|
|
@ -119,4 +119,43 @@
|
|||
# Retrofit2
|
||||
-dontwarn retrofit2.**
|
||||
-keep class retrofit2.** { *; }
|
||||
-keepattributes Signature, Exceptions
|
||||
-keepattributes Signature, Exceptions
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Hilt 核心规则
|
||||
# --------------------------------------------------
|
||||
|
||||
# 保留 Hilt 的注解处理器生成的类
|
||||
-keep class dagger.hilt.internal.aggregatedroot.** { *; }
|
||||
-keep class hilt_aggregated_deps.** { *; }
|
||||
|
||||
# 保留使用 @AndroidEntryPoint 注解的 Android 组件(Activity, Fragment, View, Service, BroadcastReceiver)
|
||||
-keep class * extends android.app.Application { @dagger.hilt.android.AndroidEntryPoint <init>(); }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <fields>; }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <methods>; }
|
||||
|
||||
# 保留 Hilt 模块类,确保依赖提供逻辑不被混淆
|
||||
-keep @dagger.Module class *
|
||||
-keep @dagger.hilt.InstallIn class *
|
||||
|
||||
# 保留 Hilt 入口点(EntryPoint)相关的类
|
||||
-keep @dagger.hilt.EntryPoint class *
|
||||
-keepclassmembers @dagger.hilt.EntryPoint class * { *; }
|
||||
|
||||
# 保留 Hilt 生成的组件(Component)相关类
|
||||
-keep @dagger.hilt.components.SingletonComponent class *
|
||||
-keepclassmembers @dagger.hilt.components.SingletonComponent class * { *; }
|
||||
|
||||
# 保留 Hilt 处理器生成的工厂类
|
||||
-keep class * extends dagger.internal.Binding { *; }
|
||||
-keep class * extends dagger.internal.Factory { *; }
|
||||
-keep class * implements dagger.MembersInjector { *; }
|
||||
-keep class * implements dagger.Lazy { *; }
|
||||
|
||||
# 保留泛型信息,这对依赖注入很关键
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
|
||||
# 保留注解信息(Hilt 严重依赖注解)
|
||||
-keepattributes *Annotation*
|
||||
|
|
@ -28,8 +28,11 @@ abstract class BaseApp : Application() {
|
|||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
instance = this
|
||||
customOnCreate();
|
||||
}
|
||||
|
||||
abstract fun customOnCreate()
|
||||
|
||||
override fun onTerminate() {
|
||||
super.onTerminate()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,4 +117,42 @@
|
|||
# Retrofit2
|
||||
-dontwarn retrofit2.**
|
||||
-keep class retrofit2.** { *; }
|
||||
-keepattributes Signature, Exceptions
|
||||
-keepattributes Signature, Exceptions
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Hilt 核心规则
|
||||
# --------------------------------------------------
|
||||
|
||||
# 保留 Hilt 的注解处理器生成的类
|
||||
-keep class dagger.hilt.internal.aggregatedroot.** { *; }
|
||||
-keep class hilt_aggregated_deps.** { *; }
|
||||
|
||||
# 保留使用 @AndroidEntryPoint 注解的 Android 组件(Activity, Fragment, View, Service, BroadcastReceiver)
|
||||
-keep class * extends android.app.Application { @dagger.hilt.android.AndroidEntryPoint <init>(); }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <fields>; }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <methods>; }
|
||||
|
||||
# 保留 Hilt 模块类,确保依赖提供逻辑不被混淆
|
||||
-keep @dagger.Module class *
|
||||
-keep @dagger.hilt.InstallIn class *
|
||||
|
||||
# 保留 Hilt 入口点(EntryPoint)相关的类
|
||||
-keep @dagger.hilt.EntryPoint class *
|
||||
-keepclassmembers @dagger.hilt.EntryPoint class * { *; }
|
||||
|
||||
# 保留 Hilt 生成的组件(Component)相关类
|
||||
-keep @dagger.hilt.components.SingletonComponent class *
|
||||
-keepclassmembers @dagger.hilt.components.SingletonComponent class * { *; }
|
||||
|
||||
# 保留 Hilt 处理器生成的工厂类
|
||||
-keep class * extends dagger.internal.Binding { *; }
|
||||
-keep class * extends dagger.internal.Factory { *; }
|
||||
-keep class * implements dagger.MembersInjector { *; }
|
||||
-keep class * implements dagger.Lazy { *; }
|
||||
|
||||
# 保留泛型信息,这对依赖注入很关键
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
|
||||
# 保留注解信息(Hilt 严重依赖注解)
|
||||
-keepattributes *Annotation*
|
||||
|
|
@ -117,4 +117,42 @@
|
|||
# Retrofit2
|
||||
-dontwarn retrofit2.**
|
||||
-keep class retrofit2.** { *; }
|
||||
-keepattributes Signature, Exceptions
|
||||
-keepattributes Signature, Exceptions
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Hilt 核心规则
|
||||
# --------------------------------------------------
|
||||
|
||||
# 保留 Hilt 的注解处理器生成的类
|
||||
-keep class dagger.hilt.internal.aggregatedroot.** { *; }
|
||||
-keep class hilt_aggregated_deps.** { *; }
|
||||
|
||||
# 保留使用 @AndroidEntryPoint 注解的 Android 组件(Activity, Fragment, View, Service, BroadcastReceiver)
|
||||
-keep class * extends android.app.Application { @dagger.hilt.android.AndroidEntryPoint <init>(); }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <fields>; }
|
||||
-keepclasseswithmembers class * { @dagger.hilt.android.AndroidEntryPoint <methods>; }
|
||||
|
||||
# 保留 Hilt 模块类,确保依赖提供逻辑不被混淆
|
||||
-keep @dagger.Module class *
|
||||
-keep @dagger.hilt.InstallIn class *
|
||||
|
||||
# 保留 Hilt 入口点(EntryPoint)相关的类
|
||||
-keep @dagger.hilt.EntryPoint class *
|
||||
-keepclassmembers @dagger.hilt.EntryPoint class * { *; }
|
||||
|
||||
# 保留 Hilt 生成的组件(Component)相关类
|
||||
-keep @dagger.hilt.components.SingletonComponent class *
|
||||
-keepclassmembers @dagger.hilt.components.SingletonComponent class * { *; }
|
||||
|
||||
# 保留 Hilt 处理器生成的工厂类
|
||||
-keep class * extends dagger.internal.Binding { *; }
|
||||
-keep class * extends dagger.internal.Factory { *; }
|
||||
-keep class * implements dagger.MembersInjector { *; }
|
||||
-keep class * implements dagger.Lazy { *; }
|
||||
|
||||
# 保留泛型信息,这对依赖注入很关键
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
|
||||
# 保留注解信息(Hilt 严重依赖注解)
|
||||
-keepattributes *Annotation*
|
||||
Loading…
Reference in New Issue