You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Kotlin auto-value class that implements parcelable and needs to be serialized by moshi. I'm using auto-value-parceleable and auto-value-moshi. I've followed the recommendation in issue #70 to include a @JvmStatic annotation on my jsonAdapter factory method. However, the MoshiJsonAdapter nested class is generated on $AutoValue_<class_name> instead of AutoValue_<class_name>.
AutoValue adds prefixes of an increasing number of $ symbols for the more extensions that apply to a single AutoValue type. In Java, you can reference nested classes from subtypes of the type in which the class is nested. Kotlin, however, does not allow this trick, which means that you must reference the nested class by directly referring to the class in which it was generated. What's also crazy, is that if you add a third extension to your project it might actually bump the JSON generator later in the chain and it would actually cause your build to fail because they have moved to $$AutoValue_LockSelectionModel.
I have a Kotlin auto-value class that implements parcelable and needs to be serialized by moshi. I'm using auto-value-parceleable and auto-value-moshi. I've followed the recommendation in issue #70 to include a
@JvmStatic
annotation on my jsonAdapter factory method. However, theMoshiJsonAdapter
nested class is generated on$AutoValue_<class_name>
instead ofAutoValue_<class_name>
.That feels like a bug. My class looks like this:
The text was updated successfully, but these errors were encountered: