Skip to content

Commit 1723b60

Browse files
committed
Merge remote-tracking branch 'origin/baxter/upstream-flow-timeout' into baxter/upstream-flow-timeout
* origin/baxter/upstream-flow-timeout: (328 commits) Commit API dump Cleanup API, update knit Fix typo in runTest method docs (Kotlin#3417) Update coroutines-and-channels.md (Kotlin#3410) chore: update the website's release step (Kotlin#3397) ktl-695 chore: support Dokka HTML customization (Kotlin#3388) update: KT-50122 adding kotlinx.dependencies Improve bump-version.sh (Kotlin#3365) Fix documentation for `DEBUG_PROPERTY_VALUE_OFF` (Kotlin#3389) feat: moving coroutines hands-on to docs (Kotlin#3369) Version 1.6.4 Improve CoroutineDispatcher documentation (Kotlin#3359) Update binary compatibility validator to 0.11.0 (Kotlin#3362) Add a scope for launching background work in tests (Kotlin#3348) Fix debug module publication with shadow plugin (Kotlin#3357) Comply with Subscriber rule 2.7 in the `await*` impl (Kotlin#3360) Update readme (Kotlin#3343) Reduce reachable references of disposed invokeOnTimeout handle (Kotlin#3353) breakleg; knit validation fix Additional comment in CoroutineScheduler ... # Conflicts: # README.md
2 parents a393446 + 8685c6d commit 1723b60

File tree

1 file changed

+32
-54
lines changed

1 file changed

+32
-54
lines changed

README.md

+32-54
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
[![Kotlin Stable](https://kotl.in/badges/stable.svg)](https://kotlinlang.org/docs/components-stability.html)
44
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
55
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
6-
[![Download](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.4.3)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.4.3/pom)
7-
[![Kotlin](https://img.shields.io/badge/kotlin-1.4.30-blue.svg?logo=kotlin)](http://kotlinlang.org)
6+
[![Download](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.4)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.4/pom)
7+
[![Kotlin](https://img.shields.io/badge/kotlin-1.6.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
88
[![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/coroutines/)
99

1010
Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
11-
This is a companion version for Kotlin `1.4.30` release.
11+
This is a companion version for the Kotlin `1.6.21` release.
1212

1313
```kotlin
1414
suspend fun main() = coroutineScope {
@@ -84,77 +84,61 @@ Add dependencies (you can also add other modules that you need):
8484
<dependency>
8585
<groupId>org.jetbrains.kotlinx</groupId>
8686
<artifactId>kotlinx-coroutines-core</artifactId>
87-
<version>1.4.3</version>
87+
<version>1.6.4</version>
8888
</dependency>
8989
```
9090

9191
And make sure that you use the latest Kotlin version:
9292

9393
```xml
9494
<properties>
95-
<kotlin.version>1.4.30</kotlin.version>
95+
<kotlin.version>1.6.21</kotlin.version>
9696
</properties>
9797
```
9898

9999
### Gradle
100100

101101
Add dependencies (you can also add other modules that you need):
102102

103-
```groovy
103+
```kotlin
104104
dependencies {
105-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3'
105+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
106106
}
107107
```
108108

109109
And make sure that you use the latest Kotlin version:
110110

111-
```groovy
112-
buildscript {
113-
ext.kotlin_version = '1.4.30'
111+
```kotlin
112+
plugins {
113+
// For build.gradle.kts (Kotlin DSL)
114+
kotlin("jvm") version "1.6.21"
115+
116+
// For build.gradle (Groovy DSL)
117+
id "org.jetbrains.kotlin.jvm" version "1.6.21"
114118
}
115119
```
116120

117121
Make sure that you have `mavenCentral()` in the list of repositories:
118122

119-
```
120-
repository {
123+
```kotlin
124+
repositories {
121125
mavenCentral()
122126
}
123127
```
124128

125-
### Gradle Kotlin DSL
126-
127-
Add dependencies (you can also add other modules that you need):
128-
129-
```groovy
130-
dependencies {
131-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
132-
}
133-
```
134-
135-
And make sure that you use the latest Kotlin version:
136-
137-
```groovy
138-
plugins {
139-
kotlin("jvm") version "1.4.30"
140-
}
141-
```
142-
143-
Make sure that you have `mavenCentral()` in the list of repositories.
144-
145129
### Android
146130

147131
Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
148-
module as dependency when using `kotlinx.coroutines` on Android:
132+
module as a dependency when using `kotlinx.coroutines` on Android:
149133

150-
```groovy
151-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3'
134+
```kotlin
135+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
152136
```
153137

154-
This gives you access to Android [Dispatchers.Main]
155-
coroutine dispatcher and also makes sure that in case of crashed coroutine with unhandled exception this
156-
exception is logged before crashing Android application, similarly to the way uncaught exceptions in
157-
threads are handled by Android runtime.
138+
This gives you access to the Android [Dispatchers.Main]
139+
coroutine dispatcher and also makes sure that in case of a crashed coroutine with an unhandled exception that
140+
this exception is logged before crashing the Android application, similarly to the way uncaught exceptions in
141+
threads are handled by the Android runtime.
158142

159143
#### R8 and ProGuard
160144

@@ -165,8 +149,9 @@ For more details see ["Optimization" section for Android](ui/kotlinx-coroutines-
165149

166150
The `kotlinx-coroutines-core` artifact contains a resource file that is not required for the coroutines to operate
167151
normally and is only used by the debugger. To exclude it at no loss of functionality, add the following snippet to the
168-
`android` block in your gradle file for the application subproject:
169-
```groovy
152+
`android` block in your Gradle file for the application subproject:
153+
154+
```kotlin
170155
packagingOptions {
171156
resources.excludes += "DebugProbesKt.bin"
172157
}
@@ -177,23 +162,24 @@ packagingOptions {
177162
Core modules of `kotlinx.coroutines` are also available for
178163
[Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) and [Kotlin/Native](https://kotlinlang.org/docs/reference/native-overview.html).
179164

180-
In common code that should get compiled for different platforms, you can add dependency to `kotlinx-coroutines-core` right to the `commonMain` source set:
181-
```groovy
165+
In common code that should get compiled for different platforms, you can add a dependency to `kotlinx-coroutines-core` right to the `commonMain` source set:
166+
167+
```kotlin
182168
commonMain {
183169
dependencies {
184-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
170+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
185171
}
186172
}
187173
```
188174

189-
No more additional dependencies is needed, platform-specific artifacts will be resolved automatically via Gradle metadata available since Gradle 5.3.
175+
No more additional dependencies are needed, platform-specific artifacts will be resolved automatically via Gradle metadata available since Gradle 5.3.
190176

191177
Platform-specific dependencies are recommended to be used only for non-multiplatform projects that are compiled only for target platform.
192178

193179
#### JS
194180

195181
Kotlin/JS version of `kotlinx.coroutines` is published as
196-
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.4.3/jar)
182+
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.6.4/jar)
197183
(follow the link to get the dependency declaration snippet) and as [`kotlinx-coroutines-core`](https://www.npmjs.com/package/kotlinx-coroutines-core) NPM package.
198184

199185
#### Native
@@ -202,14 +188,6 @@ Kotlin/Native version of `kotlinx.coroutines` is published as
202188
[`kotlinx-coroutines-core-$platform`](https://mvnrepository.com/search?q=kotlinx-coroutines-core-) where `$platform` is
203189
the target Kotlin/Native platform. [List of currently supported targets](https://github.com/Kotlin/kotlinx.coroutines/blob/master/gradle/compile-native-multiplatform.gradle#L16).
204190

205-
206-
Only single-threaded code (JS-style) on Kotlin/Native is supported in stable versions.
207-
Additionally, special `-native-mt` version is released on a regular basis, for the state of multi-threaded coroutines support
208-
please follow the [corresponding issue](https://github.com/Kotlin/kotlinx.coroutines/issues/462) for the additional details.
209-
210-
Since Kotlin/Native does not generally provide binary compatibility between versions,
211-
you should use the same version of Kotlin/Native compiler as was used to build `kotlinx.coroutines`.
212-
213191
## Building and Contributing
214192

215193
See [Contributing Guidelines](CONTRIBUTING.md).

0 commit comments

Comments
 (0)