From 7d857a7bdd6ea71e1d3580013362a828ee8127e2 Mon Sep 17 00:00:00 2001 From: Marek Stransky <77441794+Hopsaheysa@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:33:07 +0100 Subject: [PATCH] Improve R8 rules (#65) Fixes: #64 It was happening that instead of `ApiErrorCode` - null was assigned to `ApiError.error` This means that during "minification" the whole `ApiErrorCode` enum class was thrown away --- library/consumer-proguard-rules.pro | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/library/consumer-proguard-rules.pro b/library/consumer-proguard-rules.pro index b495a7b..c051c8a 100644 --- a/library/consumer-proguard-rules.pro +++ b/library/consumer-proguard-rules.pro @@ -5,5 +5,12 @@ @com.google.gson.annotations.SerializedName ; } --keepclassmembers class com.wultra.android.powerauth.networking.data.** { *; } --keepclassmembers class com.wultra.android.powerauth.networking.error.** { *; } \ No newline at end of file +# keeps fields in the class +-keepclassmembers class com.wultra.android.powerauth.networking.data.** { ; } +# handle R8 full mode optimizations +-keep, allowobfuscation class com.wultra.android.powerauth.networking.data.** + +# keeps fields in the class +-keepclassmembers class com.wultra.android.powerauth.networking.error.** { ; } +# handle R8 full mode optimizations +-keep, allowobfuscation class com.wultra.android.powerauth.networking.error.** \ No newline at end of file