Skip to content

Commit 7beec94

Browse files
committed
feat: update proguard-rules and consumer-rules.pro
Signed-off-by: Gaurav Goel <[email protected]>
1 parent 0ae4879 commit 7beec94

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

core/consumer-rules.pro

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Keep the Web3Auth core classes and methods
2+
-keep class com.web3auth.core.** { *; }
3+
-keep class com.web3auth.core.types.ChainConfig { *; }
4+
-keep class com.web3auth.core.types.** { *; }
5+
-keep class com.web3auth.core.api.** { *; }
6+
7+
-keepattributes *Annotation*
8+
-keep class com.google.gson.annotations.SerializedName
9+
-keepclassmembers class * {
10+
@com.google.gson.annotations.SerializedName <fields>;
11+
}
12+
13+
# Keep all JsonElement types from Gson
14+
-keep class com.google.gson.JsonArray { *; }
15+
-keep class com.google.gson.JsonObject { *; }
16+
-keep class com.google.gson.JsonElement { *; }
17+
18+
# Preserve annotations and parameter names
19+
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod
20+
21+
# If using Gson or any reflection-based serialization:
22+
-keepclassmembers class * {
23+
@com.google.gson.annotations.SerializedName <fields>;
24+
}

core/proguard-rules.pro

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,23 @@
2222
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
2323
-keep class * implements com.google.gson.TypeAdapterFactory
2424
-keep class * implements com.google.gson.JsonSerializer
25-
-keep class * implements com.google.gson.JsonDeserializer
25+
-keep class * implements com.google.gson.JsonDeserializer
26+
27+
-keepattributes *Annotation*
28+
-keep class com.google.gson.annotations.SerializedName
29+
-keepclassmembers class * {
30+
@com.google.gson.annotations.SerializedName <fields>;
31+
}
32+
33+
# Keep all JsonElement types from Gson
34+
-keep class com.google.gson.JsonArray { *; }
35+
-keep class com.google.gson.JsonObject { *; }
36+
-keep class com.google.gson.JsonElement { *; }
37+
38+
# Preserve annotations and parameter names
39+
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod
40+
41+
# If using Gson or any reflection-based serialization:
42+
-keepclassmembers class * {
43+
@com.google.gson.annotations.SerializedName <fields>;
44+
}

0 commit comments

Comments
 (0)