Skip to content

Commit da0b2c2

Browse files
committed
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.
1 parent 4cc5224 commit da0b2c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/proguard-rules.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@
3232
# Retain declared checked exceptions for use by a Proxy instance.
3333
-keepattributes Exceptions
3434

35-
# Application classes that will be serialized/deserialized over Gson
36-
-keepclasseswithmembers class org.wikipedia.** { *; }
3735
# Note: The model package right now seems to include some other classes that
3836
# are not used for serialization / deserialization over Gson. Hopefully
3937
# that's not a problem since it only prevents R8 from avoiding trimming
4038
# of few more classes.
4139
-keepclasseswithmembers class fr.free.nrw.commons.*.model.** { *; }
40+
-keepclasseswithmembers class fr.free.nrw.commons.actions.** { *; }
41+
-keepclasseswithmembers class fr.free.nrw.commons.auth.csrf.** { *; }
42+
-keepclasseswithmembers class fr.free.nrw.commons.auth.login.** { *; }
43+
-keepclasseswithmembers class fr.free.nrw.commons.wikidata.mwapi.** { *; }
4244

4345
# --- /Retrofit ---
4446

0 commit comments

Comments
 (0)