I am trying to integrate Kotlin in an existing android Java project. After making the changes in the build and adding Kotlin to the project I can't find a solution to my AutoValue classes that have GsonTypeAdapter there doesn't seem to be support for this.
@AutoValue
public abstract class MediaObject implements Parcelable {
public static TypeAdapter<MediaObject> typeAdapter(Gson gson) {
return new AutoValue_MediaObject.GsonTypeAdapter(gson);
}
@SerializedName("mimetype")
public abstract String getMimeType();
@SerializedName("url")
public abstract String getUri();
}
My Gson builder:
GsonBuilder().registerTypeAdapterFactory(new AutoValueGsonTypeAdapterFactory())
Any suggestions how to resolve this or what to use instead?