Files
mobile-android/app/proguard-rules.pro
k1ngsterr1 ea537ccce1 Refactor and optimize various components
- Updated RosettaFirebaseMessagingService to use IO dispatcher for blocking calls.
- Enhanced AvatarRepository with LRU caching and improved coroutine handling for avatar loading.
- Implemented timeout for websocket connection in UnlockScreen.
- Added selection mode functionality in ChatsListScreen with haptic feedback and improved UI for chat actions.
- Improved animated dots in AttachmentComponents for a smoother visual effect.
- Refactored image downloading and caching logic in ChatDetailComponents to streamline the process.
- Optimized SwipeBackContainer to simplify gesture handling.
- Adjusted swipe back behavior in OtherProfileScreen based on image viewer state.
2026-02-12 15:38:30 +05:00

177 lines
5.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.
# 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
# ============================================================
# Firebase Cloud Messaging
# ============================================================
-keep class com.google.firebase.** { *; }
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.firebase.**
-dontwarn com.google.android.gms.**
# Keep FirebaseMessagingService
-keep class * extends com.google.firebase.messaging.FirebaseMessagingService {
*;
}
-keep class com.rosetta.messenger.push.RosettaFirebaseMessagingService { *; }
# Keep notification data models
-keepclassmembers class * {
@com.google.firebase.messaging.RemoteMessage$MessageNotificationKeys <fields>;
}
# ============================================================
# SLF4J (used by BitcoinJ/other libs)
# ============================================================
-dontwarn org.slf4j.impl.StaticLoggerBinder
# ============================================================
# Kotlin & Coroutines
# ============================================================
-keep class kotlinx.coroutines.** { *; }
-dontwarn kotlinx.coroutines.**
# Keep Kotlin metadata
-keep class kotlin.Metadata { *; }
# ============================================================
# Room Database
# ============================================================
-keep class * extends androidx.room.RoomDatabase
-keep @androidx.room.Entity class *
-keepclassmembers class * {
@androidx.room.* <methods>;
}
-keep class com.rosetta.messenger.database.** { *; }
# ============================================================
# Crypto & Security
# ============================================================
# BouncyCastle
-keep class org.bouncycastle.** { *; }
-dontwarn org.bouncycastle.**
# Tink (XChaCha20-Poly1305)
-keep class com.google.crypto.tink.** { *; }
-dontwarn com.google.crypto.tink.**
# BitcoinJ
-keep class org.bitcoinj.** { *; }
-dontwarn org.bitcoinj.**
# Security Crypto
-keep class androidx.security.crypto.** { *; }
-dontwarn androidx.security.crypto.**
# Keep crypto classes
-keep class com.rosetta.messenger.crypto.** { *; }
# ============================================================
# Compose
# ============================================================
-keep class androidx.compose.** { *; }
-dontwarn androidx.compose.**
# Keep @Composable functions
-keepclassmembers class * {
@androidx.compose.runtime.Composable <methods>;
}
# ============================================================
# R8 VerifyError fix: prevent R8 from generating invalid
# bytecode (instance-of on unexpected class Integer) in
# app UI lambdas with primitive boxing/unboxing
# ============================================================
-keep,allowobfuscation class com.rosetta.messenger.ui.** { *; }
# ============================================================
# Data Models
# ============================================================
# Keep all data classes
-keep class com.rosetta.messenger.data.** { *; }
-keep class com.rosetta.messenger.network.** { *; }
# Keep Parcelable
-keepclassmembers class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
# ============================================================
# Serialization
# ============================================================
# Keep serialization info
-keepattributes *Annotation*
-keepattributes Signature
-keepattributes InnerClasses
-keepattributes EnclosingMethod
# Gson
-keep class com.google.gson.** { *; }
-keepclassmembers class * {
@com.google.gson.annotations.SerializedName <fields>;
}
# ============================================================
# AndroidX & Material
# ============================================================
-keep class com.google.android.material.** { *; }
-dontwarn com.google.android.material.**
-keep class androidx.** { *; }
-dontwarn androidx.**
# ============================================================
# Reflection & Native
# ============================================================
-keepattributes RuntimeVisibleAnnotations
-keepattributes RuntimeInvisibleAnnotations
-keepattributes RuntimeVisibleParameterAnnotations
-keepattributes RuntimeInvisibleParameterAnnotations
# Keep native methods
-keepclasseswithmembernames class * {
native <methods>;
}
# ============================================================
# Debugging (remove in production)
# ============================================================
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
# ============================================================
# WebSocket (if using OkHttp)
# ============================================================
-dontwarn okhttp3.**
-dontwarn okio.**
-keep class okhttp3.** { *; }
-keep class okio.** { *; }
# ============================================================
# Lottie Animations
# ============================================================
-keep class com.airbnb.lottie.** { *; }
-dontwarn com.airbnb.lottie.**
# ============================================================
# Coil Image Loading
# ============================================================
-keep class coil.** { *; }
-dontwarn coil.**