Skip to content

Commit bf067e7

Browse files
chore(proguard): Add rules for DeviceInfo and Moshi
This commit updates the ProGuard rules to ensure proper functionality in release builds. - A rule has been added to keep all members of the `DeviceInfo` helper class, preventing obfuscation from removing fields used for device information gathering. - Rules for Moshi and Kotlin Metadata have been included to support reflection, which is necessary for JSON serialization/deserialization of data classes.
1 parent ca5fe13 commit bf067e7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

app/proguard-rules.pro

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,14 @@
2222

2323
-dontwarn javax.annotation.processing.Processor
2424
-dontwarn javax.annotation.processing.AbstractProcessor
25-
-dontwarn javax.annotation.processing.SupportedOptions
25+
-dontwarn javax.annotation.processing.SupportedOptions
26+
27+
# Keep device info fields
28+
-keepclassmembers class com.github.droidworksstudio.mlauncher.helper.DeviceInfo {
29+
*;
30+
}
31+
32+
# Keep Moshi reflection for data classes
33+
-keep class kotlin.Metadata { *; }
34+
-keep class com.squareup.moshi.** { *; }
35+
-keep class com.squareup.moshi.adapters.** { *; }

0 commit comments

Comments
 (0)