Skip to content

Commit b8f30bd

Browse files
committed
add proguard step
1 parent 29b3402 commit b8f30bd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,21 @@ public class Sample {
604604
- `./gradlew build` - Build project
605605
- `./gradlew test` - Run tests
606606

607+
## ProGuard / R8 Configuration
608+
609+
If you're using ProGuard or R8, add the following rules to prevent the SDK from being obfuscated:
610+
611+
```proguard
612+
# Chargebee SDK - preserve all public API classes and models
613+
-keep class com.chargebee.v4.** { *; }
614+
-keepclassmembers class com.chargebee.v4.** { *; }
615+
616+
# Keep all enum values
617+
-keepclassmembers enum com.chargebee.v4.** { *; }
618+
```
619+
620+
These rules ensure that reflection-based serialization/deserialization and the exception hierarchy work correctly at runtime.
621+
607622
## Contribution
608623
***
609624
You may contribute patches to any of the **Active** versions of this library. To do so, raise a PR against the [respective branch](#library-versions).

0 commit comments

Comments
 (0)