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
22 lines
404 B
Java
22 lines
404 B
Java
package com.example;
|
|
|
|
import com.google.gson.annotations.Since;
|
|
import com.google.gson.annotations.Until;
|
|
|
|
/**
|
|
* Uses {@link Since} and {@link Until} annotations.
|
|
*/
|
|
public class ClassWithVersionAnnotations {
|
|
@Since(1)
|
|
int i1;
|
|
|
|
@Until(1) // will be ignored with GsonBuilder.setVersion(1)
|
|
int i2;
|
|
|
|
@Since(2) // will be ignored with GsonBuilder.setVersion(1)
|
|
int i3;
|
|
|
|
@Until(2)
|
|
int i4;
|
|
}
|