This artifact <https://repo1.maven.org/maven2/org/...
# announcements
r
This artifact https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.4.0-rc/kotlin-scripting-compiler-impl-embeddable-1.4.0-rc.pom has dependency on
kotlinx-coroutines-core
1.3.7
which makes my project classpath a mess with both 1.3 a 1.4 Kotlin versions. Is it a bug? Any way to workaround?
If anyone has similar issue, this fixed my problems:
Copy code
afterEvaluate {
    val bootstrapCompilerClasspath = rootProject.buildscript.configurations
    configurations.findByName("kotlinCompilerClasspath")?.let {
        dependencies.add(it.name, files(bootstrapCompilerClasspath).filter { !it.name.contains("kotlin-stdlib") })
        dependencies.add(it.name, "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
        dependencies.add(it.name, "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion")
        dependencies.add(it.name, "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion")
        dependencies.add(it.name, "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
    }
}
h
Take a look at my other response, i think there's a gradle native mechanism for what you are doing