Skip to content

Commit eed4226

Browse files
committed
Version 1.4.0-M1
1 parent c92cec3 commit eed4226

File tree

8 files changed

+46
-15
lines changed

8 files changed

+46
-15
lines changed

CHANGES.md

+31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Change log for kotlinx.coroutines
22

3+
## Version 1.4.0-M1
4+
5+
### Breaking changes
6+
7+
* The concept of atomic cancellation in channels is removed. All operations in channels
8+
and corresponding `Flow` operators are cancellable in non-atomic way (#1813).
9+
* If `CoroutineDispatcher` throws `RejectedExecutionException`, schedule current `Job` cancellation in `Dispatchers.IO` (#2003).
10+
* `CancellableContinuation.invokeOnCancellation` is invoked is the continuation was cancelled while its resume has been dispatched (#1915).
11+
* `Flow.singleOrNull` operator is aligned with standard library and does not longer throw `IllegalStateException` on multiple values (#2289).
12+
13+
### New experimental features
14+
15+
* `SharedFlow` primitive for managing hot sources of events with support of various subscription mechanisms, replay logs and buffering (#2034).
16+
* `Flow.shareIn` and `Flow.stateIn` operators to transform cold instances of flow to hot `SharedFlow` and `StateFlow` respectively (#2047).
17+
18+
### Other
19+
20+
* Support leak-free closeable resources transfer via `onUndeliveredElement` in channels (#1936).
21+
* Changed ABI in reactive integrations for Java interoperability (#2182).
22+
* Fixed ProGuard rules for `kotlinx-coroutines-core` (#2046, #2266).
23+
* Lint settings were added to `Flow` to avoid accidental capturing of outer `CoroutineScope` for cancellation check (#2038).
24+
25+
### External contributions
26+
27+
* Allow nullable types in `Flow.firstOrNull` and `Flow.singleOrNull` by @ansman (#2229).
28+
* Add `Publisher.awaitSingleOrDefault|Null|Else` extensions by @sdeleuze (#1993).
29+
* `awaitCancellation` top-level function by @LouisCAD (#2213).
30+
* Significant part of our Gradle build scripts were migrated to `.kts` by @turansky.
31+
32+
Thank you for your contributions and participation in the Kotlin community!
33+
334
## Version 1.3.9
435

536
* Support of `CoroutineContext` in `Flow.asPublisher` and similar reactive builders (#2155).

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.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)
66
[![Kotlin](https://img.shields.io/badge/kotlin-1.4.0-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

@@ -86,7 +86,7 @@ Add dependencies (you can also add other modules that you need):
8686
<dependency>
8787
<groupId>org.jetbrains.kotlinx</groupId>
8888
<artifactId>kotlinx-coroutines-core</artifactId>
89-
<version>1.3.9</version>
89+
<version>1.4.0-M1</version>
9090
</dependency>
9191
```
9292

@@ -104,7 +104,7 @@ Add dependencies (you can also add other modules that you need):
104104

105105
```groovy
106106
dependencies {
107-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
107+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1'
108108
}
109109
```
110110

@@ -130,7 +130,7 @@ Add dependencies (you can also add other modules that you need):
130130

131131
```groovy
132132
dependencies {
133-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")
133+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1")
134134
}
135135
```
136136

@@ -152,7 +152,7 @@ In common code that should get compiled for different platforms, you can add dep
152152
```groovy
153153
commonMain {
154154
dependencies {
155-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")
155+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1")
156156
}
157157
}
158158
```
@@ -163,7 +163,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
163163
module as dependency when using `kotlinx.coroutines` on Android:
164164

165165
```groovy
166-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
166+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.0-M1'
167167
```
168168

169169
This gives you access to Android [Dispatchers.Main]
@@ -190,15 +190,15 @@ packagingOptions {
190190
### JS
191191

192192
[Kotlin/JS](https://kotlinlang.org/docs/reference/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.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)
194194
(follow the link to get the dependency declaration snippet).
195195

196196
You can also use [`kotlinx-coroutines-core`](https://www.npmjs.com/package/kotlinx-coroutines-core) package via NPM.
197197

198198
### Native
199199

200200
[Kotlin/Native](https://kotlinlang.org/docs/reference/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.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)
202202
(follow the link to get the dependency declaration snippet).
203203

204204
Only single-threaded code (JS-style) on Kotlin/Native is currently supported.

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
# Kotlin
6-
version=1.3.9-SNAPSHOT
6+
version=1.4.0-M1-SNAPSHOT
77
group=org.jetbrains.kotlinx
88
kotlin_version=1.4.0
99

kotlinx-coroutines-debug/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ https://github.com/reactor/BlockHound/blob/1.0.2.RELEASE/docs/quick_start.md).
2323
Add `kotlinx-coroutines-debug` to your project test dependencies:
2424
```
2525
dependencies {
26-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.3.9'
26+
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.4.0-M1'
2727
}
2828
```
2929

@@ -61,7 +61,7 @@ stacktraces will be dumped to the console.
6161
### Using as JVM agent
6262

6363
Debug module can also be used as a standalone JVM agent to enable debug probes on the application startup.
64-
You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.3.9.jar`.
64+
You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.4.0-M1.jar`.
6565
Additionally, on Linux and Mac OS X you can use `kill -5 $pid` command in order to force your application to print all alive coroutines.
6666
When used as Java agent, `"kotlinx.coroutines.debug.enable.creation.stack.trace"` system property can be used to control
6767
[DebugProbes.enableCreationStackTraces] along with agent startup.

kotlinx-coroutines-test/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This package provides testing utilities for effectively testing coroutines.
99
Add `kotlinx-coroutines-test` to your project test dependencies:
1010
```
1111
dependencies {
12-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.9'
12+
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.0-M1'
1313
}
1414
```
1515

ui/coroutines-guide-ui.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Add dependencies on `kotlinx-coroutines-android` module to the `dependencies { .
110110
`app/build.gradle` file:
111111

112112
```groovy
113-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9"
113+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.0-M1"
114114
```
115115

116116
You can clone [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) project from GitHub onto your

ui/kotlinx-coroutines-android/animation-app/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ org.gradle.jvmargs=-Xmx1536m
2121
# org.gradle.parallel=true
2222

2323
kotlin_version=1.4.0
24-
coroutines_version=1.3.9
24+
coroutines_version=1.4.0-M1
2525

2626
android.useAndroidX=true
2727
android.enableJetifier=true

ui/kotlinx-coroutines-android/example-app/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ org.gradle.jvmargs=-Xmx1536m
2121
# org.gradle.parallel=true
2222

2323
kotlin_version=1.4.0
24-
coroutines_version=1.3.9
24+
coroutines_version=1.4.0-M1
2525

2626
android.useAndroidX=true
2727
android.enableJetifier=true

0 commit comments

Comments
 (0)