Skip to content

Commit 1eeed50

Browse files
authored
Merge pull request #2037 from Kotlin/version-1.3.7
Version 1.3.7
2 parents 583ec6e + b3f7be2 commit 1eeed50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+519
-134
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
**/.idea/*
22
!/.idea/icon.png
33
!/.idea/vcs.xml
4+
!/.idea/copyright
5+
!/.idea/codeStyleSettings.xml
6+
!/.idea/codeStyles
47
*.iml
58
.gradle
69
.gradletasknamecache

.idea/codeStyleSettings.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/Project.xml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/kotlinx_coroutines.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change log for kotlinx.coroutines
22

3+
## Version 1.3.7
4+
5+
* Fixed problem that triggered Android Lint failure (#2004).
6+
* New `Flow.cancellable()` operator for cooperative cancellation (#2026).
7+
* Emissions from `flow` builder now check cancellation status and are properly cancellable (#2026).
8+
* New `currentCoroutineContext` function to use unambiguously in the contexts with `CoroutineScope` in receiver position (#2026).
9+
* `EXACTLY_ONCE` contract support in coroutine builders.
10+
* Various documentation improvements.
11+
312
## Version 1.3.6
413

514
### Flow

README.md

Lines changed: 8 additions & 8 deletions
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.6) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.3.6)
5+
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.3.7) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.3.7)
66

77
Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
88
This is a companion version for Kotlin `1.3.71` release.
@@ -84,7 +84,7 @@ 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.3.6</version>
87+
<version>1.3.7</version>
8888
</dependency>
8989
```
9090

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

103103
```groovy
104104
dependencies {
105-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6'
105+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
106106
}
107107
```
108108

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

129129
```groovy
130130
dependencies {
131-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6")
131+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7")
132132
}
133133
```
134134

@@ -147,7 +147,7 @@ Make sure that you have either `jcenter()` or `mavenCentral()` in the list of re
147147
Core modules of `kotlinx.coroutines` are also available for
148148
[Kotlin/JS](#js) and [Kotlin/Native](#native).
149149
In common code that should get compiled for different platforms, add dependency to
150-
[`kotlinx-coroutines-core-common`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.3.6/jar)
150+
[`kotlinx-coroutines-core-common`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.3.7/jar)
151151
(follow the link to get the dependency declaration snippet).
152152

153153
### Android
@@ -156,7 +156,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
156156
module as dependency when using `kotlinx.coroutines` on Android:
157157

158158
```groovy
159-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6'
159+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
160160
```
161161

162162
This gives you access to Android [Dispatchers.Main]
@@ -172,15 +172,15 @@ For more details see ["Optimization" section for Android](ui/kotlinx-coroutines-
172172
### JS
173173

174174
[Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) version of `kotlinx.coroutines` is published as
175-
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.3.6/jar)
175+
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.3.7/jar)
176176
(follow the link to get the dependency declaration snippet).
177177

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

180180
### Native
181181

182182
[Kotlin/Native](https://kotlinlang.org/docs/reference/native-overview.html) version of `kotlinx.coroutines` is published as
183-
[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.3.6/jar)
183+
[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.3.7/jar)
184184
(follow the link to get the dependency declaration snippet).
185185

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

benchmarks/build.gradle.kts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,31 @@
22
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5+
import me.champeau.gradle.*
6+
import org.jetbrains.kotlin.gradle.tasks.*
67

78
plugins {
89
id("net.ltgt.apt")
910
id("com.github.johnrengelman.shadow")
10-
id("me.champeau.gradle.jmh")
11+
id("me.champeau.gradle.jmh") apply false
1112
}
1213

1314
repositories {
1415
maven("https://repo.typesafe.com/typesafe/releases/")
1516
}
1617

17-
tasks.withType<KotlinCompile>().configureEach {
18-
kotlinOptions.jvmTarget = "1.8"
18+
java {
19+
sourceCompatibility = JavaVersion.VERSION_1_8
20+
targetCompatibility = JavaVersion.VERSION_1_8
1921
}
2022

21-
tasks.compileJmhKotlin {
22-
kotlinOptions.freeCompilerArgs += "-Xjvm-default=enable"
23+
apply(plugin="me.champeau.gradle.jmh")
24+
25+
tasks.named<KotlinCompile>("compileJmhKotlin") {
26+
kotlinOptions {
27+
jvmTarget = "1.8"
28+
freeCompilerArgs += "-Xjvm-default=enable"
29+
}
2330
}
2431

2532
/*
@@ -39,20 +46,20 @@ val removeRedundantFiles = tasks.register<Delete>("removeRedundantFiles") {
3946
delete("$buildDir/classes/kotlin/jmh/benchmarks/flow/scrabble/FlowPlaysScrabbleOpt\$play\$histoOfLetters\$1\$\$special\$\$inlined\$fold\$1\$1.class")
4047
delete("$buildDir/classes/kotlin/jmh/benchmarks/flow/scrabble/FlowPlaysScrabbleBase\$play\$buildHistoOnScore\$1\$\$special\$\$inlined\$filter\$1\$1.class")
4148
delete("$buildDir/classes/kotlin/jmh/benchmarks/flow/scrabble/FlowPlaysScrabbleBase\$play\$histoOfLetters\$1\$\$special\$\$inlined\$fold\$1\$1.class")
42-
delete("$buildDir/classes/kotlin/jmh/benchmarks/flow/scrabble//SaneFlowPlaysScrabble\$play\$buildHistoOnScore\$1\$\$special\$\$inlined\$filter\$1\$1.class")
49+
delete("$buildDir/classes/kotlin/jmh/benchmarks/flow/scrabble/SaneFlowPlaysScrabble\$play\$buildHistoOnScore\$1\$\$special\$\$inlined\$filter\$1\$1.class")
4350

4451
// Primes
4552
delete("$buildDir/classes/kotlin/jmh/benchmarks/flow/misc/Numbers\$\$special\$\$inlined\$filter\$1\$2\$1.class")
4653
delete("$buildDir/classes/kotlin/jmh/benchmarks/flow/misc/Numbers\$\$special\$\$inlined\$filter\$1\$1.class")
4754
}
4855

49-
tasks.jmhRunBytecodeGenerator {
56+
tasks.named("jmhRunBytecodeGenerator") {
5057
dependsOn(removeRedundantFiles)
5158
}
5259

5360
// It is better to use the following to run benchmarks, otherwise you may get unexpected errors:
5461
// ./gradlew --no-daemon cleanJmhJar jmh -Pjmh="MyBenchmark"
55-
jmh {
62+
extensions.configure<JMHPluginExtension>("jmh") {
5663
jmhVersion = "1.21"
5764
duplicateClassesStrategy = DuplicatesStrategy.INCLUDE
5865
failOnError = true
@@ -63,7 +70,7 @@ jmh {
6370
// includeTests = false
6471
}
6572

66-
tasks.jmhJar {
73+
tasks.named<Jar>("jmhJar") {
6774
baseName = "benchmarks"
6875
classifier = null
6976
version = null
@@ -76,10 +83,9 @@ dependencies {
7683
compile("io.reactivex.rxjava2:rxjava:2.1.9")
7784
compile("com.github.akarnokd:rxjava2-extensions:0.20.8")
7885

79-
compile("org.openjdk.jmh:jmh-core:1.21")
8086
compile("com.typesafe.akka:akka-actor_2.12:2.5.0")
8187
compile(project(":kotlinx-coroutines-core"))
8288

8389
// add jmh dependency on main
84-
jmhImplementation(sourceSets.main.get().runtimeClasspath)
90+
"jmhImplementation"(sourceSets.main.get().runtimeClasspath)
8591
}

benchmarks/src/jmh/kotlin/benchmarks/flow/FlowFlattenMergeBenchmark.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import benchmarks.common.*
88
import kotlinx.coroutines.*
99
import kotlinx.coroutines.flow.*
1010
import org.openjdk.jmh.annotations.*
11-
import java.util.concurrent.*
11+
import java.util.concurrent.TimeUnit
1212

1313
/**
1414
* Benchmark to measure performance of [kotlinx.coroutines.flow.FlowKt.flattenMerge].

0 commit comments

Comments
 (0)