app: adjust R8 rules to ensure our model classes are not obfuscated

With refactoring of the dataclient module, the model classes now live
within the app's source code itself. So, the existing R8 rules became
obsolete and resulted in the prodRelease version of the app not
working.

So, adjust the R8 rules so that R8 doesn't obsfuscate the model classes
that now live within the app.
This commit is contained in:
Kaartic Sivaraam 2024-04-28 16:21:14 +05:30
parent 4cc5224556
commit da0b2c28e3

View file

@ -32,13 +32,15 @@
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
# Application classes that will be serialized/deserialized over Gson
-keepclasseswithmembers class org.wikipedia.** { *; }
# Note: The model package right now seems to include some other classes that
# are not used for serialization / deserialization over Gson. Hopefully
# that's not a problem since it only prevents R8 from avoiding trimming
# of few more classes.
-keepclasseswithmembers class fr.free.nrw.commons.*.model.** { *; }
-keepclasseswithmembers class fr.free.nrw.commons.actions.** { *; }
-keepclasseswithmembers class fr.free.nrw.commons.auth.csrf.** { *; }
-keepclasseswithmembers class fr.free.nrw.commons.auth.login.** { *; }
-keepclasseswithmembers class fr.free.nrw.commons.wikidata.mwapi.** { *; }
# --- /Retrofit ---