Skip to content

Commit e7fe983

Browse files
oschwaldclaude
andcommitted
chore: Audit and update ProGuard consumer rules
Update consumer-rules.pro with explicit rules: - Add explicit keep for SdkConfig and SdkConfig.Builder - Add explicit keep for all model classes (data classes) - Add clarifying comment about internal collector/helper classes Internal classes (collector/**, helper/**) are intentionally NOT kept as they can be safely optimized by R8 - they're not part of the public API. Verified: Release build with minification succeeds (sample:assembleRelease). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ff96723 commit e7fe983

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

device-sdk/consumer-rules.pro

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99
# Keep SDK entry points
1010
-keep class com.maxmind.device.DeviceTracker { *; }
1111

12+
# Keep configuration classes (used via Builder pattern)
13+
-keep class com.maxmind.device.config.SdkConfig { *; }
14+
-keep class com.maxmind.device.config.SdkConfig$Builder { *; }
15+
1216
# Kotlin serialization rules for SDK data classes
1317
-keepattributes InnerClasses
1418

19+
# Keep all model classes (data classes with @Serializable)
20+
-keep class com.maxmind.device.model.** { *; }
21+
1522
-keepclassmembers class com.maxmind.device.model.** {
1623
*** Companion;
1724
kotlinx.serialization.KSerializer serializer(...);
@@ -26,3 +33,7 @@
2633
static **$* *;
2734
}
2835
-keepnames class <2>.<3>
36+
37+
# Note: Internal collector/helper classes (com.maxmind.device.collector.**)
38+
# are intentionally NOT kept - they can be optimized by R8 as they're not
39+
# part of the public API.

0 commit comments

Comments
 (0)