Skip to content

Commit

Permalink
app: avoid R8 from obfuscating our model classes (#5359)
Browse files Browse the repository at this point in the history
R8 shouldn't obfuscate the classes that we use for serialization /
de-serialization over Gson. This causes issues with app functioning.

Fixes #5358
  • Loading branch information
sivaraam authored Oct 22, 2023
1 parent 1490710 commit c086ff2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/proguard-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---
Expand Down

0 comments on commit c086ff2

Please sign in to comment.