Hi. Cannot sync recent coroutines native library f...
# coroutines
r
Hi. Cannot sync recent coroutines native library from jcenter or maven central
Copy code
> Could not find org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.4.1.
     Searched in the following locations:
       - <https://dl.google.com/dl/android/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-native/1.4.1/kotlinx-coroutines-core-native-1.4.1.pom>
       - <https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-coroutines-core-native/1.4.1/kotlinx-coroutines-core-native-1.4.1.pom>
       - <https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-native/1.4.1/kotlinx-coroutines-core-native-1.4.1.pom>
Latest I can sync is
1.3.8
Used remote repositories:
Copy code
allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}
b
Did you try removing your maven and gradle caches?
l
@rsetkus You are using a deprecated artifact. Remove the
-native
and it'll work.
r
Okay that worked and now I can see that 1.4.1 is synced for every platform target but on
publishToMavenLocal
getting error
Could not find "kotlinx-coroutines-core_concurrentMain"
l
You need to enable HMPP to workaround this issue. You can search for this error message in this Slack, you'll see existing answers
r
Sorry, HMPP? What is it?
b
Hierarcical Multiplatform Projects google
r
If you mean setting those properties in gradle.properties file
Copy code
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
It is been already done.
b
That's pretty much it (unless I've missed some blogpost myself)
r
Made minimal reproducible example https://github.com/rsetkus/mre-multiplatform
build
and
publishToMavenLocal
tasks produce error
Could not find "kotlinx-coroutines-core_concurrentMain"
. Also, running test
MreTest::testSample
fails giving error
Copy code
kotlin.Error: Ktor native HttpClient requires kotlinx.coroutines version with `native-mt` suffix (like `1.3.9-native-mt`). Consider checking the dependencies.
Not sure if relevant but in dependency tree I can see that ktor is pulling
1.3.9-native-mt-2
but it is promoted to
1.4.1
because of explicit project coroutines dependency, which is version
1.4.1
.