Skip to content

Commit 7cc604b

Browse files
authored
Merge pull request #509 from reown-com/devin/1750930942-add-android-proguard-rules
Add ProGuard rules to Android installation documentation
2 parents 4614e32 + 7eb4f6f commit 7cc604b

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

appkit/android/core/installation.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,31 @@ implementation("com.reown:android-core")
3333
implementation("com.reown:appkit")
3434
```
3535

36+
## ProGuard rules
37+
38+
If you encounter issues with minification, add the below rules to your application:
39+
40+
```
41+
-keepattributes *Annotation*
42+
43+
-keep class com.sun.jna.** { *; }
44+
-keepclassmembers class com.sun.jna.** {
45+
native <methods>;
46+
*;
47+
}
48+
49+
-keep class uniffi.** { *; }
50+
51+
# Preserve all public and protected fields and methods
52+
-keepclassmembers class ** {
53+
public *;
54+
protected *;
55+
}
56+
57+
-dontwarn uniffi.**
58+
-dontwarn com.sun.jna.**
59+
```
60+
3661
## Example
3762

3863
<Card

walletkit/android/installation.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,31 @@ implementation("com.reown:android-core:release_version")
2020
implementation("com.reown:walletkit:release_version")
2121
```
2222

23+
## ProGuard rules
24+
25+
If you encounter issues with minification, add the below rules to your application:
26+
27+
```
28+
-keepattributes *Annotation*
29+
30+
-keep class com.sun.jna.** { *; }
31+
-keepclassmembers class com.sun.jna.** {
32+
native <methods>;
33+
*;
34+
}
35+
36+
-keep class uniffi.** { *; }
37+
38+
# Preserve all public and protected fields and methods
39+
-keepclassmembers class ** {
40+
public *;
41+
protected *;
42+
}
43+
44+
-dontwarn uniffi.**
45+
-dontwarn com.sun.jna.**
46+
```
47+
2348
## Next Steps
2449

2550
Now that you've installed WalletKit, you're ready to start integrating it. The next section will walk you through the process of setting up your project to use the SDK.

0 commit comments

Comments
 (0)