From fe2f4a376dfee7126944470f73e82f2587a98f1f Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Thu, 12 Sep 2024 16:22:12 +0530 Subject: [PATCH] Fixed: Online library cannot be retrieved in the Play Store variant. * The issue arose after upgrading the Gradle version of our project (which introduced Android 14). The new Gradle version includes an updated minify tool that excludes SimpleXML attributes from the code. As a result, this error occurred. To resolve this, we added specific rules to the ProGuard file to ensure these attributes are retained in the release variant. --- app/proguard-rules.pro | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 8674d4e2d..162f9e532 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -48,11 +48,20 @@ ## keep everything in MetaLinkNetworkEntity.kt +-keep class org.kiwix.kiwixmobile.core.entity.MetaLinkNetworkEntity { *; } +-keep class org.kiwix.kiwixmobile.core.entity.MetaLinkNetworkEntity$* { *; } -keepnames class org.kiwix.kiwixmobile.core.entity.MetaLinkNetworkEntity$* -keepclassmembers class org.kiwix.kiwixmobile.core.entity.MetaLinkNetworkEntity$* { (...); } +## keep everything in LibraryNetworkEntity.kt +-keep class org.kiwix.kiwixmobile.core.entity.LibraryNetworkEntity { *; } +-keep class org.kiwix.kiwixmobile.core.entity.LibraryNetworkEntity$* { *; } +-keepclassmembers class org.kiwix.kiwixmobile.core.entity.LibraryNetworkEntity$* { + (...); +} + -keep class javax.xml.stream.** { *; } -dontwarn javax.xml.stream.Location -dontwarn javax.xml.stream.XMLEventReader @@ -82,3 +91,5 @@ -dontwarn org.openjsse.javax.net.ssl.SSLParameters -dontwarn org.openjsse.javax.net.ssl.SSLSocket -dontwarn org.openjsse.net.ssl.OpenJSSE + +-keep class io.reactivex.** { *; }