https://kotlinlang.org logo
Title
h

holgerbrandl

03/25/2019, 5:55 PM
Is it a known issue that with the current v1.1.3 the json artefacts are somehow broken because the kotlin serialization sub-dependencies can't be resolved:
n

napperley

03/25/2019, 7:10 PM
Have you tried doing a Gradle refresh?
h

holgerbrandl

03/25/2019, 7:11 PM
I had to add
jcenter()
    maven { url "<https://dl.bintray.com/kotlin/ktor>" }
    maven { url "<https://dl.bintray.com/kotlin/kotlinx>" }
which seems to have fixed it.
✔️ 1
However for a public release artefact I'd expect no need for a custom kotlinx maven repo
r

ribesg

03/26/2019, 9:22 AM
@holgerbrandl
kotlinx.serialization
is experimental and as such, is not in a main maven repository. It’s usual for all experimental kotlin libs like this.
j

jvassbo

03/26/2019, 10:16 AM
Also reported here, as they are transitive deps but unused: https://github.com/ktorio/ktor/issues/965
h

holgerbrandl

03/26/2019, 10:17 AM
Thanks for the details. By using experimental dependencies, it does render json-support in ktor experimental as well, doesn't it?
j

jvassbo

03/26/2019, 10:18 AM
they are unused if you just use jackson
h

holgerbrandl

03/26/2019, 10:19 AM
Still they cause trouble when using it. I've upvoted your issue, fingers crossed that they fix it soon.
j

jvassbo

03/26/2019, 10:22 AM
Our workaround has been to exclude them from the project, we're using maven though:
<dependency>
  <groupId>io.ktor</groupId>
  <artifactId>ktor-client-jackson</artifactId>
  <version>${ktor.version}</version>
  <exclusions>
    <exclusion>
      <groupId>org.jetbrains.kotlinx</groupId>
      <artifactId>kotlinx-serialization-runtime</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.jetbrains.kotlinx</groupId>
      <artifactId>kotlinx-serialization-runtime-common</artifactId>
    </exclusion>
  </exclusions>
</dependency>
h

holgerbrandl

03/26/2019, 10:22 AM
Thanks for sharing it!
j

jvassbo

03/26/2019, 10:22 AM
np 🙂 Guessing you can do the same in gradle, I'm not familiar with it