2018-10-29 21:49:42 +00:00
|
|
|
# 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
|
2018-12-10 23:19:28 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
-dontskipnonpubliclibraryclasses
|
|
|
|
# TODO enable optimization
|
|
|
|
-dontoptimize
|
|
|
|
-dontpreverify
|
|
|
|
# TODO enable obfuscation
|
|
|
|
-dontobfuscate
|
|
|
|
-verbose
|
|
|
|
|
2019-08-21 18:34:49 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
##--------------- proguard configuration for ITextPDF ----------
|
|
|
|
-dontwarn com.itextpdf.**
|
|
|
|
|
|
|
|
|
|
|
|
##--------------- proguard configuration for openCSV ----------
|
2019-02-11 21:21:24 +00:00
|
|
|
-dontwarn java.beans.**
|
|
|
|
|
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
##--------------- proguard configuration for Gson ----------
|
|
|
|
# Gson uses generic type information stored in a class file when working with fields. Proguard
|
|
|
|
# removes such information by default, so configure it to keep all of it.
|
|
|
|
-keepattributes Signature
|
|
|
|
|
|
|
|
# For using GSON @Expose annotation
|
|
|
|
-keepattributes *Annotation*
|
2019-02-11 21:21:24 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
# Gson specific classes
|
|
|
|
-dontwarn sun.misc.**
|
|
|
|
#-keep class com.google.gson.stream.** { *; }
|
2019-02-11 21:21:24 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
# Application classes that will be serialized/deserialized over Gson
|
|
|
|
-keep class com.google.gson.examples.android.model.** { *; }
|
2019-02-11 21:21:24 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
# Prevent proguard from stripping interface information from TypeAdapterFactory,
|
|
|
|
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
|
|
|
-keep class * implements com.google.gson.TypeAdapterFactory
|
|
|
|
-keep class * implements com.google.gson.JsonSerializer
|
|
|
|
-keep class * implements com.google.gson.JsonDeserializer
|
2019-02-11 21:21:24 +00:00
|
|
|
|
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
##--------------- proguard configuration for Retrofit ----------
|
|
|
|
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
|
|
|
|
# EnclosingMethod is required to use InnerClasses.
|
|
|
|
-keepattributes Signature, InnerClasses, EnclosingMethod
|
2019-02-11 21:21:24 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
# Retrofit does reflection on method and parameter annotations.
|
|
|
|
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
|
|
|
|
|
|
|
|
# Retain service method parameters when optimizing.
|
|
|
|
-keepclassmembers,allowshrinking,allowobfuscation interface * {
|
|
|
|
@retrofit2.http.* <methods>;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Ignore annotation used for build tooling.
|
|
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
|
|
|
|
|
|
|
# Ignore JSR 305 annotations for embedding nullability information.
|
|
|
|
-dontwarn javax.annotation.**
|
2019-02-11 21:21:24 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
|
|
|
|
-dontwarn kotlin.Unit
|
2019-02-11 21:21:24 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
# Top-level functions that can only be used by Kotlin.
|
|
|
|
-dontwarn retrofit2.KotlinExtensions
|
|
|
|
|
|
|
|
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
|
|
|
|
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
|
|
|
|
-if interface * { @retrofit2.http.* <methods>; }
|
|
|
|
-keep,allowobfuscation interface <1>
|
|
|
|
|
2019-08-21 18:34:49 +00:00
|
|
|
# Additional rules to avoid removing models
|
|
|
|
-keep public class cy.agorise.bitsybitshareswallet.models.** { *; }
|
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
|
|
|
|
##--------------- proguard configuration for OkHttp ----------
|
2019-02-11 21:21:24 +00:00
|
|
|
# JSR 305 annotations are for embedding nullability information.
|
|
|
|
-dontwarn javax.annotation.**
|
|
|
|
|
|
|
|
# A resource is loaded with a relative path so the package of this class must be preserved.
|
|
|
|
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
|
|
|
|
|
|
|
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
|
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
|
|
|
|
|
|
|
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
|
|
|
|
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
|
|
|
|
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
##--------------- proguard configuration for Okio ----------
|
|
|
|
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
|
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
2018-12-14 21:23:12 +00:00
|
|
|
|
2019-02-11 21:21:24 +00:00
|
|
|
|
2019-04-26 21:23:04 +00:00
|
|
|
##--------------- proguard configuration for bitcoinj ----------
|
|
|
|
# source: https://github.com/bitcoin-wallet/bitcoin-wallet/blob/v7.07/wallet/proguard.cfg#L49
|
|
|
|
-keep,includedescriptorclasses class org.bitcoinj.wallet.Protos$** { *; }
|
|
|
|
-keepclassmembers class org.bitcoinj.wallet.Protos { com.google.protobuf.Descriptors$FileDescriptor descriptor; }
|
|
|
|
-keep,includedescriptorclasses class org.bitcoin.protocols.payments.Protos$** { *; }
|
|
|
|
-keepclassmembers class org.bitcoin.protocols.payments.Protos { com.google.protobuf.Descriptors$FileDescriptor descriptor; }
|
|
|
|
-dontwarn org.bitcoinj.store.WindowsMMapHack
|
|
|
|
-dontwarn org.bitcoinj.store.LevelDBBlockStore
|
|
|
|
-dontnote org.bitcoinj.crypto.DRMWorkaround
|
|
|
|
-dontnote org.bitcoinj.crypto.TrustStoreLoader$DefaultTrustStoreLoader
|
|
|
|
-dontnote com.subgraph.orchid.crypto.PRNGFixes
|
|
|
|
-dontwarn okio.DeflaterSink
|
|
|
|
-dontwarn okio.Okio
|
|
|
|
-dontnote com.squareup.okhttp.internal.Platform
|
|
|
|
-dontwarn org.bitcoinj.store.LevelDBFullPrunedBlockStore**
|
|
|
|
-dontwarn org.bitcoinj.protocols.channels.PaymentChannelClient
|
|
|
|
|
|
|
|
|
|
|
|
##--------------- proguard configuration for Crashlytics ----------
|
2019-08-21 18:34:49 +00:00
|
|
|
# source https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=android
|
2020-12-25 23:40:25 +00:00
|
|
|
-keepattributes SourceFile,LineNumberTable # Keep file names and line numbers.
|
|
|
|
-keep public class * extends java.lang.Exception # Optional: Keep custom exceptions.
|
2019-08-21 18:34:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
##--------------- proguard configuration for Coroutines ----------
|
|
|
|
# ServiceLoader support
|
|
|
|
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
|
|
|
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
|
|
|
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
|
|
|
|
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
|
|
|
|
|
|
|
|
# Most of volatile fields are updated with AFU and should not be mangled
|
|
|
|
-keepclassmembernames class kotlinx.** {
|
|
|
|
volatile <fields>;
|
|
|
|
}
|
2019-04-26 21:23:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
##--------------- other ----------
|
|
|
|
-dontwarn org.slf4j.LoggerFactory
|
|
|
|
-dontwarn org.slf4j.MDC
|
2019-08-21 18:34:49 +00:00
|
|
|
-dontwarn org.slf4j.MarkerFactory
|
|
|
|
-keep public class cy.agorise.graphenej.** { *; }
|