JakeWharton/retrofit2-kotlinx-serialization-converter

Kotlin Serialization 1.0-M1 compatibility

NitroG42 opened this issue · 2 comments

I'm not sure if it's worth making an issue but here we go:
With the new release of Kotlin 1.4.0-rc, Kotlin Serialization 1.0-M1-1.4.0-rc must be used, which bring some error when using retrofit2-kotlinx-serialization-converter.

Those errors should be easily displayed once the project is updated but one example :

    java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/JvmResolvingKt;
        at com.jakewharton.retrofit2.converter.kotlinx.serialization.Factory.requestBodyConverter(Factory.kt:29)

Which is caused by the use of serializerByTypeToken which should be replaced as the @Deprecated say by serializer(type).
There might be more.

I'm not sure if you'd rather wait for a serialization 1.0 release or make an intermediate version for the 1.0-M1? (as I don't know how much time there will be between 1.0-M1 and 1.0)

The library might just need recompiled, or perhaps some things have moved.

Feel free to send a PR. Otherwise I'll get to it eventually.

1.0.0-RC is already there.