Skip to content

[1.7.0] Runtime JAR files in the classpath should have the same version #2546

@IgnatBeresnev

Description

@IgnatBeresnev

Build fails if Dokka is used as a dependency in buildSrc, initially reported in the community slack: link to message

The same problem is relevant for kotlinx.serialization.

Workarounds

  • Update to Gradle 7.5-rc-2, it will solve the problem
  • Exclude stdlib:
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.7.0") {
    exclude("org.jetbrains.kotlin","kotlin-stdlib-jdk8")
}

Fix

Should hopefully be solved by #2543 in 1.7.10, will post updates here.

Stacktrace

w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
    /opt/rjaros/.gradle/wrapper/dists/gradle-7.4.2-all/9uukhhbclvbegdvsww0j0cr3p/gradle-7.4.2/lib/kotlin-stdlib-1.5.31.jar (version 1.5)
    /opt/rjaros/.gradle/wrapper/dists/gradle-7.4.2-all/9uukhhbclvbegdvsww0j0cr3p/gradle-7.4.2/lib/kotlin-stdlib-common-1.5.31.jar (version 1.5)
    /opt/rjaros/.gradle/wrapper/dists/gradle-7.4.2-all/9uukhhbclvbegdvsww0j0cr3p/gradle-7.4.2/lib/kotlin-stdlib-jdk7-1.5.31.jar (version 1.5)
    /opt/rjaros/.gradle/wrapper/dists/gradle-7.4.2-all/9uukhhbclvbegdvsww0j0cr3p/gradle-7.4.2/lib/kotlin-stdlib-jdk8-1.5.31.jar (version 1.5)
    /opt/rjaros/.gradle/wrapper/dists/gradle-7.4.2-all/9uukhhbclvbegdvsww0j0cr3p/gradle-7.4.2/lib/kotlin-reflect-1.5.31.jar (version 1.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions