252 lines
8.7 KiB
Prolog
252 lines
8.7 KiB
Prolog
# 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
|
|
|
|
-keepattributes Signature, *Annotation*, SourceFile, LineNumberTable, InnerClasses, EnclosingMethod
|
|
-dontwarn sun.misc.**
|
|
|
|
# Hilt ProGuard Rules - CRITICAL FOR DEPENDENCY INJECTION
|
|
-dontwarn dagger.hilt.**
|
|
-keep class dagger.hilt.** { *; }
|
|
-keep class * extends dagger.hilt.** { *; }
|
|
|
|
# Keep all Hilt generated classes
|
|
-keep class **_HiltComponents { *; }
|
|
-keep class **_HiltComponents$* { *; }
|
|
-keep class **_HiltModules { *; }
|
|
-keep class **_HiltModules$* { *; }
|
|
-keep class * extends dagger.hilt.android.internal.managers.ApplicationComponentManager { *; }
|
|
-keep class * extends dagger.hilt.android.internal.managers.ActivityComponentManager { *; }
|
|
-keep class * extends dagger.hilt.android.internal.managers.FragmentComponentManager { *; }
|
|
-keep class * extends dagger.hilt.android.internal.managers.ViewComponentManager { *; }
|
|
-keep class * extends dagger.hilt.android.internal.managers.ServiceComponentManager { *; }
|
|
|
|
# Keep Hilt entry points and components
|
|
-keep @dagger.hilt.InstallIn class * { *; }
|
|
-keep @dagger.hilt.android.AndroidEntryPoint class * { *; }
|
|
-keep @dagger.hilt.android.HiltAndroidApp class * { *; }
|
|
|
|
# Keep classes annotated with @Module, @Component, @Subcomponent
|
|
-keep @dagger.Module class * { *; }
|
|
-keep @dagger.Component class * { *; }
|
|
-keep @dagger.Component.Builder class * { *; }
|
|
-keep @dagger.Subcomponent class * { *; }
|
|
-keep @dagger.Subcomponent.Builder class * { *; }
|
|
|
|
# Keep all classes that have @Inject constructors, fields, or methods
|
|
-keepclasseswithmembers class * {
|
|
@javax.inject.Inject <init>(...);
|
|
}
|
|
-keepclasseswithmembers class * {
|
|
@javax.inject.Inject <fields>;
|
|
}
|
|
-keepclasseswithmembers class * {
|
|
@javax.inject.Inject <methods>;
|
|
}
|
|
|
|
# Keep Application class and its generated Hilt class
|
|
-keep class com.utsmm.kbz.MyApplication { *; }
|
|
-keep class com.utsmm.kbz.Hilt_MyApplication { *; }
|
|
-keep class com.utsmyanmar.baselib.BaseApplication { *; }
|
|
|
|
# Keep main activity and its generated classes
|
|
-keep class com.utsmm.kbz.MainActivity { *; }
|
|
|
|
# ViewModels and Repository classes (important for injection)
|
|
-keep class * extends androidx.lifecycle.ViewModel { *; }
|
|
-keep class com.utsmyanmar.baselib.repo.Repository { *; }
|
|
-keep class com.utsmyanmar.baselib.emv.EmvParamOperation { *; }
|
|
-keep class com.utsmyanmar.baselib.emv.TerminalParamOperation { *; }
|
|
|
|
# Keep all Dagger generated classes - these are critical!
|
|
-keep class **_Factory { *; }
|
|
-keep class **_MembersInjector { *; }
|
|
-keep class **_Provide* { *; }
|
|
|
|
-keep class com.utsmyanmar.baselib.network.model.* { <fields>; }
|
|
-keep class com.utsmyanmar.baselib.network.model.sirius.* { <fields>; }
|
|
-keep class com.utsmyanmar.baselib.db.model.* { <fields>; }
|
|
|
|
-keep class com.utsmyanmar.ecr.data.* { <fields>; }
|
|
-keep class com.utsmyanmar.ecr.data.model.* { <fields>; }
|
|
|
|
-keep class com.utsmyanmar.mpulib.data.model.* { <fields>; }
|
|
|
|
-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
|
|
|
|
# this is start
|
|
-keep class org.bouncycastle.** { *; }
|
|
-keep interface org.bouncycastle.** { *; }
|
|
-keep class okhttp3.internal.platform.BouncyCastlePlatform { *; }
|
|
|
|
# Keep classes from the JNDI package
|
|
-keep class javax.naming.** { *; }
|
|
-keep class javax.naming.directory.** { *; }
|
|
|
|
# Keep Bouncy Castle classes
|
|
-keep class org.bouncycastle.** { *; }
|
|
|
|
# Keep Conscrypt classes
|
|
-keep class org.conscrypt.** { *; }
|
|
|
|
# Keep OpenJSSE classes
|
|
-keep class org.openjsse.** { *; }
|
|
|
|
# Keep classes from okhttp3.internal.platform.BouncyCastlePlatform
|
|
-keep class okhttp3.internal.platform.BouncyCastlePlatform { *; }
|
|
|
|
# Keep classes from okhttp3.internal.platform.ConscryptPlatform
|
|
-keep class okhttp3.internal.platform.ConscryptPlatform$Companion { *; }
|
|
#-keep class okhttp3.internal.platform.ConscryptPlatform$platformTrustManager$2 { *; }
|
|
|
|
# Keep classes from okhttp3.internal.platform.OpenJSSEPlatform
|
|
-keep class okhttp3.internal.platform.OpenJSSEPlatform { *; }
|
|
|
|
#this is end
|
|
|
|
-keepclassmembers,allowobfuscation class * {
|
|
@com.google.gson.annotations.SerializedName <fields>;
|
|
}
|
|
|
|
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
|
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
|
|
|
|
|
# Jun9 2022
|
|
|
|
#-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
#-keep class * extends com.bumptech.glide.module.AppGlideModule {
|
|
# <init>(...);
|
|
#}
|
|
#-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
|
# **[] $VALUES;
|
|
# public *;
|
|
#}
|
|
|
|
#-assumenosideeffects class android.util.Log {
|
|
#public static int d(...);
|
|
#public static int v(...);
|
|
#public static int i(...);
|
|
#public static int w(...);
|
|
#public static int wtf(...);
|
|
# }
|
|
|
|
-dontwarn okhttp3.internal.platform.**
|
|
-dontwarn org.conscrypt.**
|
|
-dontwarn org.bouncycastle.**
|
|
-dontwarn org.openjsse.**
|
|
|
|
# RxJava 3 Rules - Critical for Observable chains
|
|
-keep class io.reactivex.rxjava3.** { *; }
|
|
-dontwarn io.reactivex.rxjava3.**
|
|
-keep class io.reactivex.rxjava3.core.** { *; }
|
|
-keep class io.reactivex.rxjava3.android.** { *; }
|
|
-keep class io.reactivex.rxjava3.schedulers.** { *; }
|
|
|
|
# Retrofit and OkHttp rules
|
|
-keepattributes RuntimeVisibleAnnotations
|
|
-keep class retrofit2.** { *; }
|
|
-keepclassmembernames interface * {
|
|
@retrofit2.http.* <methods>;
|
|
}
|
|
|
|
# AndroidX and Lifecycle components
|
|
-keep class androidx.lifecycle.** { *; }
|
|
-keep class * extends androidx.lifecycle.ViewModel { *; }
|
|
-keep class androidx.activity.** { *; }
|
|
-keep class androidx.fragment.** { *; }
|
|
|
|
# Navigation component rules
|
|
-keep class androidx.navigation.** { *; }
|
|
-keep class * implements androidx.navigation.NavDirections { *; }
|
|
|
|
# DataBinding rules
|
|
-keep class androidx.databinding.** { *; }
|
|
-keep class * extends androidx.databinding.ViewDataBinding { *; }
|
|
|
|
# Room database rules (if using Room)
|
|
-keep class androidx.room.** { *; }
|
|
-keep class * extends androidx.room.RoomDatabase { *; }
|
|
|
|
# PayLibs and device-specific rules
|
|
-keep class com.utsmyanmar.paylibs.** { *; }
|
|
-keep class com.nexgo.** { *; }
|
|
-keep class com.sunmi.** { *; }
|
|
-keep class com.utsmyanmar.checkxread.** { *; }
|
|
-keep class com.utsmyanmar.ecr.** { *; }
|
|
-keep class com.utsmyanmar.mpulib.** { *; }
|
|
-keep class com.utsmyanmar.baselib.** { *; }
|
|
|
|
# Enum preservation for critical enums
|
|
-keepclassmembers enum * {
|
|
public static **[] values();
|
|
public static ** valueOf(java.lang.String);
|
|
}
|
|
|
|
# Keep model classes from obfuscation completely
|
|
-keep class com.utsmyanmar.paylibs.model.** { *; }
|
|
-keep class com.utsmyanmar.baselib.db.model.** { *; }
|
|
|
|
# Critical: Keep all native methods and JNI classes
|
|
-keepclasseswithmembernames class * {
|
|
native <methods>;
|
|
}
|
|
|
|
# Keep critical system params and utils
|
|
-keep class com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation { *; }
|
|
-keep class com.utsmyanmar.paylibs.utils.** { *; }
|
|
|
|
# Prevent obfuscation of classes used in reflection
|
|
-keep class * extends java.lang.Exception
|
|
-keep class * extends java.lang.Error
|
|
|
|
# CRITICAL: Keep all generated application components from obfuscation
|
|
-keep class com.utsmm.kbz.MyApplication_GeneratedInjector { *; }
|
|
#-keep class com.utsmm.kbz.MyApplication_HiltComponents$SingletonC { *; }
|
|
#-keep class com.utsmm.kbz.MyApplication_HiltComponents { *; }
|
|
|
|
# Keep all classes with "Generated" in their name (Hilt generates these)
|
|
-keep class **_Generated { *; }
|
|
-keep class **GeneratedInjector { *; }
|
|
|
|
# Additional protection for the specific classes causing crashes
|
|
-keep class **.D0.h { *; }
|
|
-keep class **.m2.f { *; }
|
|
-keep class **.J3.b { *; }
|
|
|
|
# Keep everything in the di package to prevent injection failures
|
|
-keep class com.utsmyanmar.baselib.di.** { *; }
|
|
-keep class com.utsmm.kbz.di.** { *; }
|
|
|
|
# Hilt Extension points
|
|
#-keep class * extends dagger.hilt.android.internal.managers.ApplicationComponentManager$ApplicationComponentBuilder { *; }
|
|
|
|
# Don't obfuscate any annotation processing related classes
|
|
-keep class dagger.internal.** { *; }
|
|
-keepnames class dagger.internal.** { *; }
|
|
|
|
# Keep annotation-based bindings
|
|
-keep @javax.inject.Inject class * { *; }
|
|
-keep @dagger.Provides class * { *; }
|
|
-keep @dagger.Module class * { *; } |