https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

janvladimirmostert

07/05/2020, 9:24 AM
which repository do i need to make use of coroutines in 1.4 M2?
Copy code
sourceSets {
		val commonMain by getting {
			dependencies {
				implementation(kotlin("stdlib-common"))

				val coroutinesVersion = "1.3.7-1.4-M2"
				api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
			}
		}
Copy code
> Could not find org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.7-1.4-M2.
     Searched in the following locations:
       - <https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-coroutines-core-common/1.3.7-1.4-M2/kotlinx-coroutines-core-common-1.3.7-1.4-M2.pom>
       - <https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-common/1.3.7-1.4-M2/kotlinx-coroutines-core-common-1.3.7-1.4-M2.pom>
       - <https://dl.bintray.com/kotlin/kotlin-eap/org/jetbrains/kotlinx/kotlinx-coroutines-core-common/1.3.7-1.4-M2/kotlinx-coroutines-core-common-1.3.7-1.4-M2.pom>
       - <https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlinx/kotlinx-coroutines-core-common/1.3.7-1.4-M2/kotlinx-coroutines-core-common-1.3.7-1.4-M2.pom>
     Required by:
r

Rachid

07/05/2020, 1:18 PM
I think adding
repository { jcenter() }
to the Gradle file would do it
j

janvladimirmostert

07/05/2020, 1:20 PM
jcenter() is the first repository i have in there
Copy code
repositories {
		jcenter()
		mavenCentral()
		maven {
			url = uri("<https://dl.bintray.com/kotlin/kotlin-eap>")
		}
		maven {
			url = uri("<https://kotlin.bintray.com/kotlinx>")
		}
	}
r

Rachid

07/05/2020, 1:26 PM
Sorry, I don't have the solution. Are you using the newest kotlin plugin as well?
j

janvladimirmostert

07/05/2020, 1:27 PM
that is correct, i'm (almost) bleeding edge here
Copy code
plugins {
    val kotlinVersion = "1.4-M2"
    kotlin("multiplatform") version kotlinVersion
    kotlin("plugin.serialization") version kotlinVersion
}
do i need a plugin for coroutines as well ?
r

Rachid

07/05/2020, 1:30 PM
AFAIK not
j

janvladimirmostert

07/05/2020, 1:31 PM
no worries, i'll stick to JVM-only for now and use an older version of coroutines, that seems to work This M2 one doesn't want to play along Thanks for the help!
👍 1
i

Ilya Goncharov [JB]

07/05/2020, 8:36 PM
Since 1.4 version there is no common artifact, there is -metadata artifact, you can use one kotlin-coroutines-core without suffix at all in your dependeincies
👍 1
3 Views