ipfs-api-kotlin icon indicating copy to clipboard operation
ipfs-api-kotlin copied to clipboard

Moshi problem

Open kingsleyh opened this issue 3 years ago • 0 comments

Hey

having a moshi issue

in my build.gradle I was already using this:

    // Kotlin KSP support
    id("com.google.devtools.ksp") version "1.6.20-1.0.4"

    // Json
    implementation("com.squareup.moshi:moshi:1.13.0")
    implementation("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.6.20-1.0.4")
    ksp("com.squareup.moshi:moshi-kotlin-codegen:1.13.0")

    // IPFS
    implementation("com.github.ligi:ipfs-api-kotlin:0.15")

Any idea how to solve this now I tried to add ipfs-api-kotlin?

 val multiHash = LocalIPFS().add.string("hello").Hash
  println(multiHash)
Cannot serialize Kotlin type io.ipfs.kotlin.model.NamedHash. Reflective serialization of Kotlin classes without using kotlin-reflect has undefined and unexpected behavior. Please use KotlinJsonAdapterFactory from the moshi-kotlin artifact or use code gen from the moshi-kotlin-codegen artifact.

kingsleyh avatar Apr 21 '22 10:04 kingsleyh