Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated coroutines for use native-mt version #3330

Merged
merged 2 commits into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions docs/source/essentials/get-started-multiplatform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,23 @@ kotlin {
```

## Multithreaded coroutines
If using the x.y.z-native-mt branch of coroutines, gradle will replace the -native-mt version with the non-mt version as outlined [here](https://kotlinlang.org/docs/mobile/concurrency-and-coroutines.html#multithreaded-coroutines). To prevent this happening use the following:
If using the x.y.z-native-mt branch of coroutines, gradle will replace the -native-mt version with the non-mt version as outlined [here](https://kotlinlang.org/docs/mobile/concurrency-and-coroutines.html#multithreaded-coroutines). To prevent this happening add the following to your root `build.gradle.kts`:

```
implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core"){
version {
strictly("x.y.z-native-mt")
```kotlin
allprojects {
configurations {
all {
resolutionStrategy {
force("org.jetbrains.kotlinx:kotlinx-coroutines-core:x.y.z-native-mt")
}
}
}
}
```

This ensures that the same version is used everywhere and that Gradle doesn't fail because `-native-mt` is a pre-release version [(`1.5.1-native-mt < 1.5.1`)](https://docs.gradle.org/current/userguide/dependency_resolution.html#sub:resolution-strategy)


## Download your `schema.json` file

<DownloadSchema />
Expand Down