RedTahr1
02/02/2021, 12:49 PMFailed to resolve: org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0.1
Isn't this available on jcenter? or what should I do?Karlo Lozovina
02/02/2021, 12:59 PMimplementation("org.jetbrains.kotlinx", "kotlinx-serialization-core", "1.0.1")
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-json", "1.0.1")
Karlo Lozovina
02/02/2021, 12:59 PMKarlo Lozovina
02/02/2021, 1:00 PMkotlin("plugin.serialization") version "1.4.21"
RedTahr1
02/02/2021, 1:02 PMVampire
02/02/2021, 1:04 PMVampire
02/02/2021, 1:04 PMThe id of the core artifact withannotation and@Serializable
format was changed fromJson
tokotlinx-serialization-runtime
to be more clear and aligned with other kotlinx libraries.kotlinx-serialization-core
Vampire
02/02/2021, 1:05 PMVampire
02/02/2021, 1:05 PMIn 1.0.0-RC2,class and related entities are located inJson
artifact. To migrate, simply replacekotlinx-serialization-json
dependency withkotlinx-serialization-core
. Core library then will be included automatically as the transitive dependency.-json
For most use-cases, you should use newartifact. Usekotlinx-serialization-json
if you are writing a library that depends on kotlinx.serialization in a format-agnostic way of provides its own serial format.kotlinx-serialization-core
RedTahr1
02/02/2021, 1:10 PMkotlinx-serialization-json
since I otherwis cannot find imports for Json. Is there any harm to include both when not writing library?RedTahr1
02/02/2021, 1:15 PMVampire
02/02/2021, 1:25 PMcore
artifact, don't declare it as dependencey.
If you use a class from the core
artifact explicitly, then also declare a dependency and don't just rely on it being present transitively.