diff --git a/example/build.gradle b/example/build.gradle index 1b6255d73..e84d8622b 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -31,7 +31,7 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } diff --git a/example/proguard-rules.pro b/example/proguard-rules.pro index 481bb4348..806edf49e 100644 --- a/example/proguard-rules.pro +++ b/example/proguard-rules.pro @@ -14,8 +14,41 @@ # Uncomment this to preserve the line number information for # debugging stack traces. -#-keepattributes SourceFile,LineNumberTable +-keepattributes SourceFile,LineNumberTable +-printconfiguration ~/tmp/full-r8-config.txt # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile +-keep public class * extends android.view.View { + public (android.content.Context); +} +-dontwarn java.beans.ConstructorProperties +-dontwarn java.beans.Transient + +-keep class com.walletconnect.* { *; } +-keep class com.walletconnect.wcmodal.client.* { *; } + +-keepclasseswithmembernames class org.xmtp.proto.message.contents.* { *; } +-keep class com.sun.jna.* { *; } +-keep class uniffi.xmtpv3.* { *; } + +-dontwarn java.awt.Component +-dontwarn java.awt.GraphicsEnvironment +-dontwarn java.awt.HeadlessException +-dontwarn java.awt.Window + +# Lifecycle +-keep public interface androidx.lifecycle.** { *; } + +-assumenosideeffects class android.util.Log { + public static *** d(...); + public static *** v(...); + public static *** i(...); +} + +-dontwarn com.google.android.gms.** +-keep public class com.google.android.gms.** +-keep class com.google.android.gms.common.ConnectionResult { + int SUCCESS; +} diff --git a/library/proguard-rules.pro b/library/proguard-rules.pro index b17f2462e..3817f55a7 100644 --- a/library/proguard-rules.pro +++ b/library/proguard-rules.pro @@ -22,4 +22,5 @@ -dontwarn java.awt.* -keep class com.sun.jna.* { *; } --keepclassmembers class * extends com.sun.jna.* { public *; } \ No newline at end of file +-keepclassmembers class * extends com.sun.jna.* { public *; } +-keepclassmembers class * extends com.walletconnect.* { *; } \ No newline at end of file