Tasos Stamadianos
12/04/2018, 4:18 PMgildor
12/04/2018, 4:26 PMTasos Stamadianos
12/04/2018, 4:31 PMfred.deschenes
12/04/2018, 4:40 PMTasos Stamadianos
12/04/2018, 4:41 PMilya.gorbunov
12/04/2018, 7:29 PMkotlin-reflect
. Could you show the entire warning telling what artifacts have conflicting versions?Tasos Stamadianos
12/04/2018, 9:57 PMRuntime JAR files in the classpath should have the same version. These files were found in the classpath:
/home/tasos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.2.71/5470d1f752cd342edb77e1062bac07e838d2cea4/kotlin-stdlib-jdk8-1.2.71.jar (version 1.2)
/home/tasos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.2.71/4ce93f539e2133f172f1167291a911f83400a5d0/kotlin-stdlib-jdk7-1.2.71.jar (version 1.2)
/home/tasos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.10/b178c1501609c6e4ee8be635513cb023a466457d/kotlin-stdlib-1.3.10.jar (version 1.3)
/home/tasos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.10/1b19d99229dcedad7caf50534dce38fe82845269/kotlin-stdlib-common-1.3.10.jar (version 1.3)
I narrowed down the dependency causing this issue to the popular Javalin HTTP framework, which has an issue referencing Kotlin 1.3 support here: https://github.com/tipsy/javalin/issues/434
thanks!!ilya.gorbunov
12/04/2018, 11:13 PMkotlin-stdlib:1.3.10
and Javalin depens on kotlin-stdlib-jdk8:1.2.71
which itselfs depends transitively on kotlin-stdlib:1.2.71
. Gradle resolves that transitive dependency version conflict by choosing the highest version of kotlin-stdlib
, but it's ok from gradle's standpoint to leave 1.2.71
version of stdlib-jdk8.
You can resolve this warning by depending explicitly on kotlin-stdlib-jdk8:1.3.10
.Tasos Stamadianos
12/04/2018, 11:15 PMimplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
to:
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.10")
will fix it?build.gradle.kts
ilya.gorbunov
12/04/2018, 11:17 PMTasos Stamadianos
12/04/2018, 11:17 PMilya.gorbunov
12/04/2018, 11:17 PMbuild.gradle
or at least dependencies
section?Tasos Stamadianos
12/04/2018, 11:18 PMilya.gorbunov
12/04/2018, 11:42 PMkotlin
core libraries consistent. To make it easier we're going to provide a bill-of-materials (BOM) artifact in 1.3.20, which lists all these libraries versions to keep them in sync (see https://youtrack.jetbrains.com/issue/KT-18398).
This BOM artifact can be used in Maven to pin versions of your dependencies, and AFAIK in Gradle since 5.0.