43396e45fd
* 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
30 lines
829 B
Prolog
30 lines
829 B
Prolog
### Common rules for ProGuard and R8
|
|
### Should only contains rules needed specifically for the integration test;
|
|
### any general rules which are relevant for all users should not be here but in `META-INF/proguard` of Gson
|
|
|
|
-allowaccessmodification
|
|
|
|
# On Windows mixed case class names might cause problems
|
|
-dontusemixedcaseclassnames
|
|
|
|
# Ignore notes about duplicate JDK classes
|
|
-dontnote module-info,jdk.internal.**
|
|
|
|
|
|
# Keep test entrypoints
|
|
-keep class com.example.Main {
|
|
public static void runTests(...);
|
|
}
|
|
-keep class com.example.DefaultConstructorMain {
|
|
public static java.lang.String runTest();
|
|
public static java.lang.String runTestNoJdkUnsafe();
|
|
}
|
|
|
|
|
|
### Test data setup
|
|
|
|
# Keep fields without annotations which should be preserved
|
|
-keepclassmembers class com.example.ClassWithNamedFields {
|
|
!transient <fields>;
|
|
}
|