Currently Moshi expects JsonAdapters to have the ParameterizedType. But the R8 fullMode (which is enabled by default since AGP8) strips signatures from non-kept items. Therefore the check in parametersAreJsonAdapters (also in the Kotlin implementation) fails because of this assumption and you run into a IllegalArgumentException at runtime.
I was able to fix this by adding the following proguard rule:
-keep,allowobfuscation,allowshrinking class com.squareup.moshi.JsonAdapter
I would expect this rule as part of the META-INF/proguard/moshi.pro
Currently Moshi expects JsonAdapters to have the
ParameterizedType. But the R8 fullMode (which is enabled by default since AGP8) strips signatures from non-kept items. Therefore the check in parametersAreJsonAdapters (also in the Kotlin implementation) fails because of this assumption and you run into a IllegalArgumentException at runtime.I was able to fix this by adding the following proguard rule:
-keep,allowobfuscation,allowshrinking class com.squareup.moshi.JsonAdapterI would expect this rule as part of the META-INF/proguard/moshi.pro