* Perform minor code clean-up
Notable changes:
- Replace most usages of `<code>` with `{@code ...}` in Javadoc
- Add proper summary sentence to `GsonBuilder.enableComplexMapKeySerialization`
- Extend documentation for `GsonBuilder.setDateFormat` methods
- Fix `TypeToken.isAssignableFrom(Type)` throwing AssertionError in some cases
Maybe the method should not throw an exception in the first place, but it
might not matter much since it is deprecated already anyway.
- Remove outdated `throws NumberFormatException` from internal
`JsonReader.nextQuotedValue`; the behavior had been changed by
85ebaf7c35
- Fix incorrect documentation on JsonScope fields
- Fix unit tests having 'expected' and 'actual' switched
- Use dedicated Truth methods instead of `isTrue()` / `isFalse()`
- Use common helper methods in JsonWriterTest to avoid duplication
* Implement `toString()` for ReflectionAccessFilter constants
* Address most of the review comments
* Add comment about `source.scm.tag=HEAD` warning
Actually it looks like the warning is not actually caused by usage of
`HEAD` as value, but rather because the project has a snapshot version
during development (which is expected though), see
https://github.com/apache/maven-artifact-plugin/blob/maven-artifact-plugin-3.5.0/src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildInfoWriter.java#L140
But this is not a problem either since during release a non-snapshot
version is used.
* Adjust ProGuard default rules and shrinking tests
* Adjust comment
* Add shrinking test for class without no-args constructor; improve docs
* Improve Unsafe mention in Troubleshooting Guide
* Improve comment for `-if class *`
* Add code shrinking tools integration test
* Keep no-args constructor of classes usable with JsonAdapter
* Add library ProGuard rules for Gson
They are automatically applied for all users of Gson, see
https://developer.android.com/build/shrink-code#configuration-files
* Skip japicmp-maven-plugin for shrinker-test
* Add more tests for JsonAdapter, add tests for generic classes
* Extend default constructor test
* Add Troubleshooting Guide entry for TypeToken
Previously after Proguard, the classes would no longer implement the interfaces, leading to `JsonAdapterAnnotationTypeAdapterFactory` throwing.
Fixes#925
Gson.fromJson does not currently work in this application with proguard enabled: The reason seems to be that Cart's field List<LineItem> gets rewritten as raw List type.