Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for R8 and missing classes in release build #177

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
37 changes: 35 additions & 2 deletions example/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
#-renamesourcefileattribute SourceFile
-keep public class * extends android.view.View {
public <init>(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;
}
3 changes: 2 additions & 1 deletion library/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@

-dontwarn java.awt.*
-keep class com.sun.jna.* { *; }
-keepclassmembers class * extends com.sun.jna.* { public *; }
-keepclassmembers class * extends com.sun.jna.* { public *; }
-keepclassmembers class * extends com.walletconnect.* { *; }
Loading