150 lines
9.9 KiB
Prolog
150 lines
9.9 KiB
Prolog
# ──────────────────────────────────────────────────────────────────
|
|
# Protobuf lite
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Google Tink 1.13.0
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keepclassmembers class * extends com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite {
|
|
<fields>;
|
|
}
|
|
-keep class com.google.crypto.tink.KeyTemplates { *; }
|
|
-keep class com.google.crypto.tink.StreamingAead { *; }
|
|
-keep class com.google.crypto.tink.KeysetHandle { *; }
|
|
-keep class com.google.crypto.tink.integration.android.AndroidKeysetManager { *; }
|
|
-keep class com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder { *; }
|
|
-keep class com.google.crypto.tink.streamingaead.StreamingAeadConfig { *; }
|
|
-keep class com.google.crypto.tink.streamingaead.AesGcmHkdfStreamingKeyManager { *; }
|
|
-keep class com.google.crypto.tink.streamingaead.StreamingAeadWrapper { *; }
|
|
-keep class com.google.crypto.tink.subtle.AesGcmHkdfStreaming { *; }
|
|
-dontwarn com.google.crypto.tink.**
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# kotlinx.serialization
|
|
# The compiler plugin generates a $serializer inner class for every
|
|
# @Serializable class. R8 must not remove or rename these — they are
|
|
# looked up by name at runtime via SerializersModule.
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keepattributes *Annotation*, InnerClasses
|
|
-keep class kotlinx.serialization.SerializersKt { *; }
|
|
-dontnote kotlinx.serialization.**
|
|
-dontwarn kotlinx.serialization.**
|
|
|
|
# Keep generated serializers for all @Serializable classes in your app
|
|
-keepclassmembers class com.bitcointxoko.gudariwallet.** {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
# Keep the $serializer companion objects themselves
|
|
-keep class com.bitcointxoko.gudariwallet.**$$serializer { *; }
|
|
|
|
# Required for sealed class polymorphic serialization
|
|
-keepclassmembers @kotlinx.serialization.Serializable class * {
|
|
*** Companion;
|
|
*** INSTANCE;
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Retrofit 3.0.0
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
|
|
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
|
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
|
|
-keep,allowobfuscation,allowshrinking class * extends kotlin.coroutines.CoroutineContext$Element { *; }
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# OkHttp 5.x / Okio
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keep class okhttp3.internal.publicsuffix.PublicSuffixDatabase { *; }
|
|
-keepnames class okhttp3.** { *; }
|
|
-dontwarn okhttp3.**
|
|
-dontwarn okio.**
|
|
-dontwarn javax.annotation.**
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# secp256k1-kmp (JNI)
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keep class fr.acinq.secp256k1.** { *; }
|
|
-keepclasseswithmembernames class * {
|
|
native <methods>;
|
|
}
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# ZXing 4.3.0
|
|
#
|
|
# ZXing uses reflection to instantiate Reader subclasses by class name.
|
|
# Only the classes your app actually exercises need to be kept.
|
|
# A Lightning wallet only needs QR code scanning (QR_CODE format).
|
|
# ──────────────────────────────────────────────────────────────────
|
|
|
|
# Core entry points used directly via the API
|
|
-keep class com.google.zxing.BarcodeFormat { *; }
|
|
-keep class com.google.zxing.DecodeHintType { *; }
|
|
-keep class com.google.zxing.Result { *; }
|
|
-keep class com.google.zxing.ResultMetadataType { *; }
|
|
-keep class com.google.zxing.MultiFormatReader { *; }
|
|
|
|
# QR code reader — instantiated reflectively by MultiFormatReader
|
|
-keep class com.google.zxing.qrcode.QRCodeReader { *; }
|
|
-keep class com.google.zxing.qrcode.decoder.** { *; }
|
|
-keep class com.google.zxing.qrcode.detector.** { *; }
|
|
|
|
# QR code generator
|
|
-keep class com.google.zxing.qrcode.QRCodeWriter { *; }
|
|
|
|
# Common infrastructure used by all readers
|
|
-keep class com.google.zxing.common.** { *; }
|
|
|
|
# Suppress warnings for unused format readers (1D barcodes, DataMatrix, etc.)
|
|
# that are in the jar but not needed by a wallet app
|
|
-dontwarn com.google.zxing.**
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Room 2.7.1
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keep @androidx.room.Entity class *
|
|
-keep @androidx.room.Dao interface *
|
|
-keep class * extends androidx.room.RoomDatabase { *; }
|
|
-dontwarn androidx.room.**
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# WorkManager 2.9.1
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keep class * extends androidx.work.InputMerger { *; }
|
|
-keep class * extends androidx.work.Worker { *; }
|
|
-keep class * extends androidx.work.CoroutineWorker { *; }
|
|
-keep class * extends androidx.work.ListenableWorker { *; }
|
|
-keep class * extends androidx.work.WorkerFactory { *; }
|
|
# Keep specific classes explicitly as a safety net
|
|
-keep class com.bitcointxoko.gudariwallet.sync.HistoricalSyncWorker { *; }
|
|
-keep class com.bitcointxoko.gudariwallet.sync.HistoricalSyncWorker$Companion { *; }
|
|
-keep class com.bitcointxoko.gudariwallet.sync.HistoricalSyncWorkerFactory { *; }
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Kotlin Coroutines 1.11.0
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
|
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
|
-dontwarn kotlinx.coroutines.**
|
|
-dontwarn kotlinx.coroutines.debug.*
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Lyricist 1.8.0
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keep class com.bitcointxoko.gudariwallet.**Strings { *; }
|
|
-keep class com.bitcointxoko.gudariwallet.**Translations { *; }
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Timber 5.0.1
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-dontwarn org.jetbrains.annotations.**
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Stack traces — upload mapping.txt to Play Console / Crashlytics
|
|
# ──────────────────────────────────────────────────────────────────
|
|
-keepattributes SourceFile,LineNumberTable
|
|
-renamesourcefileattribute SourceFile
|