22
33[ ![ official JetBrains project] ( https://jb.gg/badges/official.svg )] ( https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub )
44[ ![ GitHub license] ( https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat )] ( https://www.apache.org/licenses/LICENSE-2.0 )
5- [ ![ Download] ( https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.4.2 ) ] ( https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.4.2 )
6- [ ![ Kotlin] ( https://img.shields.io/badge/kotlin-1.4.0 -blue.svg?logo=kotlin )] ( http://kotlinlang.org )
5+ [ ![ Download] ( https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.4.3 ) ] ( https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.4.3 )
6+ [ ![ Kotlin] ( https://img.shields.io/badge/kotlin-1.4.30 -blue.svg?logo=kotlin )] ( http://kotlinlang.org )
77[ ![ Slack channel] ( https://img.shields.io/badge/chat-slack-green.svg?logo=slack )] ( https://kotlinlang.slack.com/messages/coroutines/ )
88
99Library support for Kotlin coroutines with [ multiplatform] ( #multiplatform ) support.
10- This is a companion version for Kotlin ` 1.4.0 ` release.
10+ This is a companion version for Kotlin ` 1.4.30 ` release.
1111
1212``` kotlin
1313suspend fun main () = coroutineScope {
@@ -45,6 +45,7 @@ suspend fun main() = coroutineScope {
4545* [ debug] ( kotlinx-coroutines-debug/README.md ) &mdash ; debug utilities for coroutines:
4646 * [ DebugProbes] API to probe, keep track of, print and dump active coroutines;
4747 * [ CoroutinesTimeout] test rule to automatically dump coroutines on test timeout.
48+ * Automatic integration with [ BlockHound] ( https://github.com/reactor/BlockHound ) .
4849* [ reactive] ( reactive/README.md ) &mdash ; modules that provide builders and iteration support for various reactive streams libraries:
4950 * Reactive Streams ([ Publisher.collect] , [ Publisher.awaitSingle] , [ kotlinx.coroutines.reactive.publish] , etc),
5051 * Flow (JDK 9) (the same interface as for Reactive Streams),
@@ -86,15 +87,15 @@ Add dependencies (you can also add other modules that you need):
8687<dependency >
8788 <groupId >org.jetbrains.kotlinx</groupId >
8889 <artifactId >kotlinx-coroutines-core</artifactId >
89- <version >1.4.2 </version >
90+ <version >1.4.3 </version >
9091</dependency >
9192```
9293
9394And make sure that you use the latest Kotlin version:
9495
9596``` xml
9697<properties >
97- <kotlin .version>1.4.0 </kotlin .version>
98+ <kotlin .version>1.4.30 </kotlin .version>
9899</properties >
99100```
100101
@@ -104,23 +105,23 @@ Add dependencies (you can also add other modules that you need):
104105
105106``` groovy
106107dependencies {
107- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2 '
108+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3 '
108109}
109110```
110111
111112And make sure that you use the latest Kotlin version:
112113
113114``` groovy
114115buildscript {
115- ext.kotlin_version = '1.4.0 '
116+ ext.kotlin_version = '1.4.30 '
116117}
117118```
118119
119- Make sure that you have either ` jcenter() ` or ` mavenCentral() ` in the list of repositories:
120+ Make sure that you have ` mavenCentral() ` in the list of repositories:
120121
121122```
122123repository {
123- jcenter ()
124+ mavenCentral ()
124125}
125126```
126127
@@ -130,51 +131,38 @@ Add dependencies (you can also add other modules that you need):
130131
131132``` groovy
132133dependencies {
133- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2 ")
134+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3 ")
134135}
135136```
136137
137138And make sure that you use the latest Kotlin version:
138139
139140``` groovy
140141plugins {
141- kotlin("jvm") version "1.4.0 "
142+ kotlin("jvm") version "1.4.30 "
142143}
143144```
144145
145- Make sure that you have either ` jcenter() ` or ` mavenCentral() ` in the list of repositories.
146-
147- ### Multiplatform
148-
149- Core modules of ` kotlinx.coroutines ` are also available for
150- [ Kotlin/JS] ( #js ) and [ Kotlin/Native] ( #native ) .
151- In common code that should get compiled for different platforms, you can add dependency to ` kotlinx-coroutines-core ` right to the ` commonMain ` source set:
152- ``` groovy
153- commonMain {
154- dependencies {
155- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
156- }
157- }
158- ```
146+ Make sure that you have ` mavenCentral() ` in the list of repositories.
159147
160148### Android
161149
162150Add [ ` kotlinx-coroutines-android ` ] ( ui/kotlinx-coroutines-android )
163151module as dependency when using ` kotlinx.coroutines ` on Android:
164152
165153``` groovy
166- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2 '
154+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3 '
167155```
168156
169157This gives you access to Android [ Dispatchers.Main]
170158coroutine dispatcher and also makes sure that in case of crashed coroutine with unhandled exception this
171- exception is logged before crashing Android application, similarly to the way uncaught exceptions in
172- threads are handled by Android runtime.
159+ exception is logged before crashing Android application, similarly to the way uncaught exceptions in
160+ threads are handled by Android runtime.
173161
174162#### R8 and ProGuard
175163
176164R8 and ProGuard rules are bundled into the [ ` kotlinx-coroutines-android ` ] ( ui/kotlinx-coroutines-android ) module.
177- For more details see [ "Optimization" section for Android] ( ui/kotlinx-coroutines-android/README.md#optimization ) .
165+ For more details see [ "Optimization" section for Android] ( ui/kotlinx-coroutines-android/README.md#optimization ) .
178166
179167#### Avoiding including the debug infrastructure in the resulting APK
180168
@@ -187,27 +175,40 @@ packagingOptions {
187175}
188176```
189177
190- ### JS
178+ ### Multiplatform
191179
192- [ Kotlin/JS] ( https://kotlinlang.org/docs/js-overview.html ) version of ` kotlinx.coroutines ` is published as
193- [ ` kotlinx-coroutines-core-js ` ] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.4.2/jar )
194- (follow the link to get the dependency declaration snippet).
195-
196- You can also use [ ` kotlinx-coroutines-core ` ] ( https://www.npmjs.com/package/kotlinx-coroutines-core ) package via NPM.
180+ Core modules of ` kotlinx.coroutines ` are also available for
181+ [ Kotlin/JS] ( https://kotlinlang.org/docs/reference/js-overview.html ) and [ Kotlin/Native] ( https://kotlinlang.org/docs/reference/native-overview.html ) .
197182
198- ### Native
183+ In common code that should get compiled for different platforms, you can add dependency to ` kotlinx-coroutines-core ` right to the ` commonMain ` source set:
184+ ``` groovy
185+ commonMain {
186+ dependencies {
187+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
188+ }
189+ }
190+ ```
199191
200- [ Kotlin/Native] ( https://kotlinlang.org/docs/native-overview.html ) version of ` kotlinx.coroutines ` is published as
201- [ ` kotlinx-coroutines-core-native ` ] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.4.2/jar )
202- (follow the link to get the dependency declaration snippet).
192+ No more additional dependencies is needed, platform-specific artifacts will be resolved automatically via Gradle metadata available since Gradle 5.3.
203193
204- Only single-threaded code (JS-style) on Kotlin/Native is currently supported.
205- Kotlin/Native supports only Gradle version 4.10 and you need to enable Gradle metadata in your
206- ` settings.gradle ` file:
194+ Platform-specific dependencies are recommended to be used only for non-multiplatform projects that are compiled only for target platform.
207195
208- ``` groovy
209- enableFeaturePreview('GRADLE_METADATA')
210- ```
196+ #### JS
197+
198+ Kotlin/JS version of ` kotlinx.coroutines ` is published as
199+ [ ` kotlinx-coroutines-core-js ` ] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.4.3/jar )
200+ (follow the link to get the dependency declaration snippet) and as [ ` kotlinx-coroutines-core ` ] ( https://www.npmjs.com/package/kotlinx-coroutines-core ) NPM package.
201+
202+ #### Native
203+
204+ Kotlin/Native version of ` kotlinx.coroutines ` is published as
205+ [ ` kotlinx-coroutines-core-$platform ` ] ( https://mvnrepository.com/search?q=kotlinx-coroutines-core- ) where ` $platform ` is
206+ the target Kotlin/Native platform. [ List of currently supported targets] ( https://github.com/Kotlin/kotlinx.coroutines/blob/master/gradle/compile-native-multiplatform.gradle#L16 ) .
207+
208+
209+ Only single-threaded code (JS-style) on Kotlin/Native is supported in stable versions.
210+ Additionally, special ` -native-mt ` version is released on a regular basis, for the state of multi-threaded coroutines support
211+ please follow the [ corresponding issue] ( https://github.com/Kotlin/kotlinx.coroutines/issues/462 ) for the additional details.
211212
212213Since Kotlin/Native does not generally provide binary compatibility between versions,
213214you should use the same version of Kotlin/Native compiler as was used to build ` kotlinx.coroutines ` .
@@ -218,6 +219,7 @@ See [Contributing Guidelines](CONTRIBUTING.md).
218219
219220<!-- - MODULE kotlinx-coroutines-core -->
220221<!-- - INDEX kotlinx.coroutines -->
222+
221223[ launch ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/launch.html
222224[ async ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/async.html
223225[ Job ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/index.html
@@ -239,52 +241,81 @@ See [Contributing Guidelines](CONTRIBUTING.md).
239241[ Promise.await ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/kotlin.js.-promise/await.html
240242[ promise ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/promise.html
241243[ Window.asCoroutineDispatcher ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/org.w3c.dom.-window/as-coroutine-dispatcher.html
244+
242245<!-- - INDEX kotlinx.coroutines.flow -->
246+
243247[ Flow ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html
244248[ _flow ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow.html
245249[ filter ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/filter.html
246250[ map ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/map.html
251+
247252<!-- - INDEX kotlinx.coroutines.channels -->
253+
248254[ Channel ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-channel/index.html
255+
249256<!-- - INDEX kotlinx.coroutines.selects -->
257+
250258[ select ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.selects/select.html
259+
251260<!-- - INDEX kotlinx.coroutines.sync -->
261+
252262[ Mutex ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-mutex/index.html
253263[ Semaphore ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-semaphore/index.html
264+
254265<!-- - MODULE kotlinx-coroutines-test -->
255266<!-- - INDEX kotlinx.coroutines.test -->
267+
256268[ Dispatchers.setMain ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/kotlinx.coroutines.-dispatchers/set-main.html
257269[ TestCoroutineScope ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-scope/index.html
270+
258271<!-- - MODULE kotlinx-coroutines-debug -->
259272<!-- - INDEX kotlinx.coroutines.debug -->
273+
260274[ DebugProbes ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-debug/kotlinx.coroutines.debug/-debug-probes/index.html
275+
261276<!-- - INDEX kotlinx.coroutines.debug.junit4 -->
277+
262278[ CoroutinesTimeout ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-debug/kotlinx.coroutines.debug.junit4/-coroutines-timeout/index.html
279+
263280<!-- - MODULE kotlinx-coroutines-slf4j -->
264281<!-- - INDEX kotlinx.coroutines.slf4j -->
282+
265283[ MDCContext ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-slf4j/kotlinx.coroutines.slf4j/-m-d-c-context/index.html
284+
266285<!-- - MODULE kotlinx-coroutines-jdk8 -->
267286<!-- - INDEX kotlinx.coroutines.future -->
287+
268288[ CompletionStage.await ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-jdk8/kotlinx.coroutines.future/java.util.concurrent.-completion-stage/await.html
289+
269290<!-- - MODULE kotlinx-coroutines-guava -->
270291<!-- - INDEX kotlinx.coroutines.guava -->
292+
271293[ ListenableFuture.await ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-guava/kotlinx.coroutines.guava/com.google.common.util.concurrent.-listenable-future/await.html
294+
272295<!-- - MODULE kotlinx-coroutines-play-services -->
273296<!-- - INDEX kotlinx.coroutines.tasks -->
297+
274298[ Task.await ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-play-services/kotlinx.coroutines.tasks/com.google.android.gms.tasks.-task/await.html
299+
275300<!-- - MODULE kotlinx-coroutines-reactive -->
276301<!-- - INDEX kotlinx.coroutines.reactive -->
302+
277303[ Publisher.collect ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactive/kotlinx.coroutines.reactive/org.reactivestreams.-publisher/collect.html
278304[ Publisher.awaitSingle ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactive/kotlinx.coroutines.reactive/org.reactivestreams.-publisher/await-single.html
279305[ kotlinx.coroutines.reactive.publish ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactive/kotlinx.coroutines.reactive/publish.html
306+
280307<!-- - MODULE kotlinx-coroutines-rx2 -->
281308<!-- - INDEX kotlinx.coroutines.rx2 -->
309+
282310[ rxFlowable ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx2/kotlinx.coroutines.rx2/rx-flowable.html
283311[ rxSingle ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx2/kotlinx.coroutines.rx2/rx-single.html
312+
284313<!-- - MODULE kotlinx-coroutines-rx2 -->
285314<!-- - INDEX kotlinx.coroutines.rx2 -->
286315<!-- - MODULE kotlinx-coroutines-reactor -->
287316<!-- - INDEX kotlinx.coroutines.reactor -->
317+
288318[ flux ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactor/kotlinx.coroutines.reactor/flux.html
289319[ mono ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactor/kotlinx.coroutines.reactor/mono.html
320+
290321<!-- - END -->
0 commit comments