Is there a way to force all Kotlin versions to 1.4...
# announcements
r
Is there a way to force all Kotlin versions to 1.4 in Gradle? Even if there are libraries used, that were compiled with 1.3.72? I'm getting the following warning:
Copy code
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
    /opt/rjaros/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.72/8032138f12c0180bc4e51fe139d4c52b46db6109/kotlin-stdlib-1.3.72.jar (version 1.3)
    /opt/rjaros/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.0-rc/4f17246362f6cbcf924f199a06619a4f77b51335/kotlin-stdlib-common-1.4.0-rc.jar (version 1.4)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
but also compiler errors, which probably are caused by this incompatibility:
Copy code
Caused by: java.lang.NoSuchMethodError: kotlin.sequences.SequencesKt.flatMapIterable(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
        at org.jetbrains.kotlin.resolve.calls.components.CollectionTypeVariableUsagesInfo.getDependentTypeParameters(ResolutionParts.kt:342)
h
So you mean sth like force in dependency Resolution strategy? https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html
1
✔️ 1