Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
res/ | H | 25-Apr-2025 | - | 18 | 14 | |
src/com/google/gson/examples/android/ | H | 25-Apr-2025 | - | 228 | 141 | |
AndroidManifest.xml | H A D | 25-Apr-2025 | 907 | 22 | 21 | |
README.md | H A D | 25-Apr-2025 | 881 | 13 | 9 | |
default.properties | H A D | 25-Apr-2025 | 390 | 12 | 11 | |
proguard.cfg | H A D | 25-Apr-2025 | 1.4 KiB | 33 | 25 |
README.md
1# android-proguard-example 2 3Example Android project showing how to properly configure [ProGuard](https://www.guardsquare.com/proguard). 4ProGuard is a tool for 'shrinking' and obfuscating compiled classes. It can rename methods and fields, 5or remove them if they appear to be unused. This can cause issues for Gson which uses Java reflection to 6access the fields of a class. It is necessary to configure ProGuard to make sure that Gson works correctly. 7 8Also have a look at the [ProGuard manual](https://www.guardsquare.com/manual/configuration/usage#keepoverview) 9for more details on how ProGuard can be configured. 10 11The R8 code shrinker uses the same rule format as ProGuard, but there are differences between these two 12tools. Have a look at R8's Compatibility FAQ, and especially at the [Gson section](https://r8.googlesource.com/r8/+/refs/heads/main/compatibility-faq.md#gson). 13