Skip to content

Commit

Permalink
fix: proguard rules for coinbase
Browse files Browse the repository at this point in the history
  • Loading branch information
Syn-McJ committed Jan 11, 2025
1 parent 57f5391 commit 8b8b207
Showing 1 changed file with 61 additions and 6 deletions.
67 changes: 61 additions & 6 deletions wallet/proguard.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,81 @@
public <methods>;
}

#Google api and drive rules
-keep class * extends com.google.api.client.json.GenericJson {
*;
# Retrofit
-keepattributes Signature
-keepattributes Exceptions
-keep class retrofit2.** { *; }
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}

# OkHttp
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
-dontwarn okio.**

# Kotlin Serialization
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt
-keepclassmembers class kotlinx.serialization.json.** {
*** Companion;
}
-keep class com.google.api.services.drive.** {
-keepclasseswithmembers class kotlinx.serialization.json.** {
kotlinx.serialization.KSerializer serializer(...);
}

# Rates
-keep class de.schildbach.wallet.rates.** { *; }

# Coinbase
-keep class org.dash.wallet.integrations.coinbase.** { *; }
-keepclassmembers class org.dash.wallet.integrations.coinbase.** { *; }
-keep class org.dash.wallet.integrations.coinbase.service.CoinBaseAuthApi {
*;
}

# Liquid
-keep class org.dash.wallet.integration.liquid.data** { *; }

-keepattributes InnerClasses

# JWT
-keep class io.jsonwebtoken** { *; }
-keepnames class io.jsonwebtoken.* { *; }
-keepnames interface io.jsonwebtoken.* { *; }

# Bouncycastle
-keep class org.bouncycastle** { *; }
-keepnames class org.bouncycastle** { *; }
-dontwarn org.bouncycastle.**

-keepclassmembers class * {
@com.google.gson.annotations.SerializedName <fields>;
}

# Retrofit
-keepattributes Signature
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes RuntimeVisibleAnnotations
-keepattributes RuntimeInvisibleAnnotations
-keep,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}

-keepclasseswithmembers interface * {
@retrofit2.http.* <methods>;
}

# Keep generic type information
-keepattributes Signature
-keepattributes EnclosingMethod

# Keep Kotlin Metadata
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep class kotlin.Metadata { *; }

0 comments on commit 8b8b207

Please sign in to comment.