Skip to content

Commit 8c2606d

Browse files
committed
Version 1.2.0
1 parent ec48ee8 commit 8c2606d

File tree

9 files changed

+36
-20
lines changed

9 files changed

+36
-20
lines changed

CHANGES.md

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

3+
## Version 1.2.0
4+
5+
* Kotlin updated to 1.3.30.
6+
* New API: `CancellableContinuation.resume` with `onCancelling` lambda (#1044) to consistently handle closeable resources.
7+
* Play services task version updated to 16.0.1.
8+
* `ReceiveChannel.isEmpty` is no longer deprecated
9+
10+
A lot of `Flow` improvements:
11+
* Purity property is renamed to context preservation and became more restrictive.
12+
* `zip` and `combineLatest` operators.
13+
* Integration with RxJava2
14+
* `flatMap`, `merge` and `concatenate` are replaced with `flattenConcat`, `flattenMerge`, `flatMapConcat` and `flatMapMerge`.
15+
* Various documentation improvements and minor bug fixes.
16+
17+
Note that `Flow` **is not** leaving its [preview status](/docs/compatibility.md#flow-preview-api).
18+
319
## Version 1.2.0-alpha-2
420

521
This release contains major [feature preview](/docs/compatibility.md#flow-preview-api): cold streams aka `Flow` (#254).

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
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.2.0-alpha-2) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.2.0-alpha-2)
5+
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.2.0) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.2.0)
66

77
Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
8-
This is a companion version for Kotlin `1.3.21` release.
8+
This is a companion version for Kotlin `1.3.30` release.
99

1010
```kotlin
1111
GlobalScope.launch {
@@ -75,15 +75,15 @@ Add dependencies (you can also add other modules that you need):
7575
<dependency>
7676
<groupId>org.jetbrains.kotlinx</groupId>
7777
<artifactId>kotlinx-coroutines-core</artifactId>
78-
<version>1.2.0-alpha-2</version>
78+
<version>1.2.0</version>
7979
</dependency>
8080
```
8181

8282
And make sure that you use the latest Kotlin version:
8383

8484
```xml
8585
<properties>
86-
<kotlin.version>1.3.21</kotlin.version>
86+
<kotlin.version>1.3.30</kotlin.version>
8787
</properties>
8888
```
8989

@@ -93,15 +93,15 @@ Add dependencies (you can also add other modules that you need):
9393

9494
```groovy
9595
dependencies {
96-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0-alpha-2'
96+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0'
9797
}
9898
```
9999

100100
And make sure that you use the latest Kotlin version:
101101

102102
```groovy
103103
buildscript {
104-
ext.kotlin_version = '1.3.21'
104+
ext.kotlin_version = '1.3.30'
105105
}
106106
```
107107

@@ -119,15 +119,15 @@ Add dependencies (you can also add other modules that you need):
119119

120120
```groovy
121121
dependencies {
122-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0-alpha-2")
122+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0")
123123
}
124124
```
125125

126126
And make sure that you use the latest Kotlin version:
127127

128128
```groovy
129129
plugins {
130-
kotlin("jvm") version "1.3.21"
130+
kotlin("jvm") version "1.3.30"
131131
}
132132
```
133133

@@ -147,7 +147,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
147147
module as dependency when using `kotlinx.coroutines` on Android:
148148

149149
```groovy
150-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.0-alpha-2'
150+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.0'
151151
```
152152
This gives you access to Android [Dispatchers.Main](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/kotlinx.coroutines.android/kotlinx.coroutines.-dispatchers/index.html)
153153
coroutine dispatcher and also makes sure that in case of crashed coroutine with unhandled exception this

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Kotlin
2-
version=1.2.0-alpha-2-SNAPSHOT
2+
version=1.2.0-SNAPSHOT
33
group=org.jetbrains.kotlinx
44
kotlin_version=1.3.30
55

kotlinx-coroutines-core/common/src/flow/internal/NullSurrogate.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import kotlin.jvm.*
88

99
internal object NullSurrogate {
1010

11-
@Suppress("NULL_FOR_NONNULL_TYPE")
1211
@JvmStatic
13-
internal fun <T> unbox(value: Any?): T = if (value === NullSurrogate) null else value as T
12+
@Suppress("UNCHECKED_CAST")
13+
internal fun <T> unbox(value: Any?): T = if (value === NullSurrogate) null as T else value as T
1414
}

kotlinx-coroutines-debug/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ of coroutines hierarchy referenced by a [Job] or [CoroutineScope] instances usin
1818
Add `kotlinx-coroutines-debug` to your project test dependencies:
1919
```
2020
dependencies {
21-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.2.0-alpha-2'
21+
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.2.0'
2222
}
2323
```
2424

@@ -57,7 +57,7 @@ stacktraces will be dumped to the console.
5757
### Using as JVM agent
5858

5959
It is possible to use this module as a standalone JVM agent to enable debug probes on the application startup.
60-
You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.2.0-alpha-2.jar`.
60+
You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.2.0.jar`.
6161
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.
6262

6363

kotlinx-coroutines-test/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Test utilities for `kotlinx.coroutines`. Provides `Dispatchers.setMain` to overr
77
Add `kotlinx-coroutines-test` to your project test dependencies:
88
```
99
dependencies {
10-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.0-alpha-2'
10+
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.0'
1111
}
1212
```
1313

ui/coroutines-guide-ui.md

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

167167
```groovy
168-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.0-alpha-2"
168+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.0"
169169
```
170170

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ org.gradle.jvmargs=-Xmx1536m
1818

1919
kotlin.coroutines=enable
2020

21-
kotlin_version=1.3.21
22-
coroutines_version=1.2.0-alpha-2
21+
kotlin_version=1.3.30
22+
coroutines_version=1.2.0
2323

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ org.gradle.jvmargs=-Xmx1536m
1818

1919
kotlin.coroutines=enable
2020

21-
kotlin_version=1.3.21
22-
coroutines_version=1.2.0-alpha-2
21+
kotlin_version=1.3.30
22+
coroutines_version=1.2.0
2323

0 commit comments

Comments
 (0)