fix: r8 broke workmanager
This commit is contained in:
Vendored
+65
-46
@@ -6,53 +6,44 @@
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# Google Tink 1.13.0
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
-keep class com.google.crypto.tink.proto.** { *; }
|
||||
-keep class com.google.crypto.tink.shaded.protobuf.** { *; }
|
||||
-keep class com.google.crypto.tink.** { *; }
|
||||
-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.**
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# Gson — generic signature safety
|
||||
# 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 Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep,allowobfuscation,allowshrinking,allowoptimization class com.google.gson.reflect.TypeToken
|
||||
-keep,allowobfuscation,allowshrinking,allowoptimization class * extends com.google.gson.reflect.TypeToken
|
||||
-keepattributes *Annotation*, InnerClasses
|
||||
-dontnote kotlinx.serialization.**
|
||||
-dontwarn kotlinx.serialization.**
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# Gson — ALL classes Gson instantiates via reflection
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# Keep generated serializers for all @Serializable classes in your app
|
||||
-keepclassmembers class com.bitcointxoko.gudariwallet.** {
|
||||
kotlinx.serialization.KSerializer serializer(...);
|
||||
}
|
||||
|
||||
# Response bodies
|
||||
-keep class com.bitcointxoko.gudariwallet.api.WalletResponse { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.PaymentStatusResponse { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.PaymentDetails { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.PaymentDetailResponse { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.WithdrawCallbackResponse { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.FiatRateResponse { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.LnurlpLink { *; }
|
||||
# Keep the $serializer companion objects themselves
|
||||
-keep class com.bitcointxoko.gudariwallet.**$$serializer { *; }
|
||||
|
||||
# NWC models
|
||||
-keep class com.bitcointxoko.gudariwallet.api.NwcGetResponse { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.NwcKey { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.NwcBudget { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.NwcNewBudget { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.NwcRegistrationRequest { *; }
|
||||
|
||||
# Request bodies
|
||||
-keep class com.bitcointxoko.gudariwallet.api.CreateInvoiceRequest { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.PayInvoiceRequest { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.DecodeInvoiceRequest { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.PayLnurlRequest { *; }
|
||||
|
||||
# SuccessAction sealed class + TypeAdapter subclasses
|
||||
-keep class com.bitcointxoko.gudariwallet.api.SuccessAction { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.FlexibleStringAdapter
|
||||
-keep class com.bitcointxoko.gudariwallet.api.SuccessActionAdapter
|
||||
|
||||
# Node alias API responses
|
||||
-keep class com.bitcointxoko.gudariwallet.api.MempoolNodeResponse { *; }
|
||||
-keep class com.bitcointxoko.gudariwallet.api.OneMlNodeResponse { *; }
|
||||
# Required for sealed class polymorphic serialization
|
||||
-keepclassmembers @kotlinx.serialization.Serializable class * {
|
||||
*** Companion;
|
||||
*** INSTANCE;
|
||||
kotlinx.serialization.KSerializer serializer(...);
|
||||
}
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# Retrofit 3.0.0
|
||||
@@ -79,8 +70,32 @@
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# 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).
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
-keep class com.google.zxing.** { *; }
|
||||
|
||||
# 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.**
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
@@ -93,11 +108,15 @@
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# WorkManager 2.9.1
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
-keep class * extends androidx.work.Worker
|
||||
-keep class * extends androidx.work.CoroutineWorker
|
||||
-keep class * extends androidx.work.ListenableWorker {
|
||||
public <init>(android.content.Context, androidx.work.WorkerParameters);
|
||||
}
|
||||
-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
|
||||
|
||||
Reference in New Issue
Block a user