2
2
3
3
[ ![ official JetBrains project] ( https://jb.gg/badges/official.svg )] ( https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub )
4
4
[ ![ 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.3.9 ) ] ( https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.3.9 )
5
+ [ ![ Download] ( https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.4.0-M1 ) ] ( https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.4.0-M1 )
6
+ [ ![ Kotlin] ( https://img.shields.io/badge/kotlin-1.4.0-blue.svg?logo=kotlin )] ( http://kotlinlang.org )
7
+ [ ![ Slack channel] ( https://img.shields.io/badge/chat-slack-green.svg?logo=slack )] ( https://kotlinlang.slack.com/messages/coroutines/ )
6
8
7
9
Library support for Kotlin coroutines with [ multiplatform] ( #multiplatform ) support.
8
10
This is a companion version for Kotlin ` 1.4.0 ` release.
@@ -44,7 +46,7 @@ suspend fun main() = coroutineScope {
44
46
* [ DebugProbes] API to probe, keep track of, print and dump active coroutines;
45
47
* [ CoroutinesTimeout] test rule to automatically dump coroutines on test timeout.
46
48
* [ reactive] ( reactive/README.md ) &mdash ; modules that provide builders and iteration support for various reactive streams libraries:
47
- * Reactive Streams ([ Publisher.collect] , [ Publisher.awaitSingle] , [ publish] , etc),
49
+ * Reactive Streams ([ Publisher.collect] , [ Publisher.awaitSingle] , [ kotlinx.coroutines.reactive. publish] , etc),
48
50
* Flow (JDK 9) (the same interface as for Reactive Streams),
49
51
* RxJava 2.x ([ rxFlowable] , [ rxSingle] , etc), and
50
52
* RxJava 3.x ([ rxFlowable] , [ rxSingle] , etc), and
@@ -84,7 +86,7 @@ Add dependencies (you can also add other modules that you need):
84
86
<dependency >
85
87
<groupId >org.jetbrains.kotlinx</groupId >
86
88
<artifactId >kotlinx-coroutines-core</artifactId >
87
- <version >1.3.9 </version >
89
+ <version >1.4.0-M1 </version >
88
90
</dependency >
89
91
```
90
92
@@ -102,7 +104,7 @@ Add dependencies (you can also add other modules that you need):
102
104
103
105
``` groovy
104
106
dependencies {
105
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 '
107
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1 '
106
108
}
107
109
```
108
110
@@ -128,7 +130,7 @@ Add dependencies (you can also add other modules that you need):
128
130
129
131
``` groovy
130
132
dependencies {
131
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 ")
133
+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1 ")
132
134
}
133
135
```
134
136
@@ -150,7 +152,7 @@ In common code that should get compiled for different platforms, you can add dep
150
152
``` groovy
151
153
commonMain {
152
154
dependencies {
153
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 ")
155
+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1 ")
154
156
}
155
157
}
156
158
```
@@ -161,7 +163,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
161
163
module as dependency when using ` kotlinx.coroutines ` on Android:
162
164
163
165
``` groovy
164
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 '
166
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.0-M1 '
165
167
```
166
168
167
169
This gives you access to Android [ Dispatchers.Main]
@@ -174,18 +176,29 @@ threads are handled by Android runtime.
174
176
R8 and ProGuard rules are bundled into the [ ` kotlinx-coroutines-android ` ] ( ui/kotlinx-coroutines-android ) module.
175
177
For more details see [ "Optimization" section for Android] ( ui/kotlinx-coroutines-android/README.md#optimization ) .
176
178
179
+ #### Avoiding including the debug infrastructure in the resulting APK
180
+
181
+ The ` kotlinx-coroutines-core ` artifact contains a resource file that is not required for the coroutines to operate
182
+ normally and is only used by the debugger. To exclude it at no loss of functionality, add the following snippet to the
183
+ ` android ` block in your gradle file for the application subproject:
184
+ ``` groovy
185
+ packagingOptions {
186
+ exclude "DebugProbesKt.bin"
187
+ }
188
+ ```
189
+
177
190
### JS
178
191
179
192
[ Kotlin/JS] ( https://kotlinlang.org/docs/reference/js-overview.html ) version of ` kotlinx.coroutines ` is published as
180
- [ ` kotlinx-coroutines-core-js ` ] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.3.9 /jar )
193
+ [ ` kotlinx-coroutines-core-js ` ] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.4.0-M1 /jar )
181
194
(follow the link to get the dependency declaration snippet).
182
195
183
196
You can also use [ ` kotlinx-coroutines-core ` ] ( https://www.npmjs.com/package/kotlinx-coroutines-core ) package via NPM.
184
197
185
198
### Native
186
199
187
200
[ Kotlin/Native] ( https://kotlinlang.org/docs/reference/native-overview.html ) version of ` kotlinx.coroutines ` is published as
188
- [ ` kotlinx-coroutines-core-native ` ] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.3.9 /jar )
201
+ [ ` kotlinx-coroutines-core-native ` ] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.4.0-M1 /jar )
189
202
(follow the link to get the dependency declaration snippet).
190
203
191
204
Only single-threaded code (JS-style) on Kotlin/Native is currently supported.
@@ -263,7 +276,7 @@ See [Contributing Guidelines](CONTRIBUTING.md).
263
276
<!-- - INDEX kotlinx.coroutines.reactive -->
264
277
[ Publisher.collect ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactive/kotlinx.coroutines.reactive/org.reactivestreams.-publisher/collect.html
265
278
[ Publisher.awaitSingle ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactive/kotlinx.coroutines.reactive/org.reactivestreams.-publisher/await-single.html
266
- [ publish ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactive/kotlinx.coroutines.reactive/publish.html
279
+ [ kotlinx.coroutines.reactive. publish] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-reactive/kotlinx.coroutines.reactive/publish.html
267
280
<!-- - MODULE kotlinx-coroutines-rx2 -->
268
281
<!-- - INDEX kotlinx.coroutines.rx2 -->
269
282
[ rxFlowable ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx2/kotlinx.coroutines.rx2/rx-flowable.html
0 commit comments