mirror of
https://github.com/bitwarden/android.git
synced 2024-11-21 17:05:44 +03:00
BIT-133: Update Proguard rules to fix login issues (#85)
This commit is contained in:
parent
c6ce992342
commit
9fe145d75d
1 changed files with 15 additions and 1 deletions
16
app/proguard-rules.pro
vendored
16
app/proguard-rules.pro
vendored
|
@ -4,6 +4,7 @@
|
|||
|
||||
# We need to access the SDK using JNA and this makes it very easy to obfuscate away the SDK unless
|
||||
# we keep it here.
|
||||
-keep class com.bitwarden.core.** { *; }
|
||||
-keep class com.bitwarden.sdk.** { *; }
|
||||
|
||||
################################################################################
|
||||
|
@ -28,7 +29,7 @@
|
|||
-keepclassmembers class com.x8bit.bitwarden.** {
|
||||
*** Companion;
|
||||
}
|
||||
-keepclasseswithmembers class om.x8bit.bitwarden.** {
|
||||
-keepclasseswithmembers class com.x8bit.bitwarden.** {
|
||||
kotlinx.serialization.KSerializer serializer(...);
|
||||
}
|
||||
|
||||
|
@ -66,16 +67,29 @@
|
|||
# Okhttp/Retrofit https://square.github.io/okhttp/ & https://square.github.io/retrofit/
|
||||
################################################################################
|
||||
|
||||
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
|
||||
# EnclosingMethod is required to use InnerClasses.
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
|
||||
# Retrofit does reflection on method and parameter annotations.
|
||||
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
|
||||
|
||||
# https://github.com/square/okhttp/blob/339732e3a1b78be5d792860109047f68a011b5eb/okhttp/src/jvmMain/resources/META-INF/proguard/okhttp3.pro#L11-L14
|
||||
-dontwarn okhttp3.internal.platform.**
|
||||
-dontwarn org.bouncycastle.**
|
||||
# Related to this issue on https://github.com/square/retrofit/issues/3880
|
||||
# Check https://github.com/square/retrofit/tags for new versions
|
||||
-keep,allowobfuscation,allowshrinking class kotlin.Result
|
||||
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
|
||||
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
||||
# This solves this issue https://github.com/square/retrofit/issues/3880
|
||||
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
|
||||
|
||||
# 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>
|
||||
|
||||
################################################################################
|
||||
# ZXing
|
||||
################################################################################
|
||||
|
|
Loading…
Reference in a new issue