app: avoid R8 from obfuscating our model classes (#5359)

R8 shouldn't obfuscate the classes that we use for serialization /
de-serialization over Gson. This causes issues with app functioning.

Fixes #5358
This commit is contained in:
Kaartic Sivaraam 2023-10-22 11:12:26 +05:30 committed by GitHub
parent 1490710a51
commit c086ff264f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,8 +31,15 @@
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
# Classes used by retrofit to fetch API repsonse
# 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.** { *; }
# --- /Retrofit ---
# --- OkHttp + Okio ---