Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hltj committed Feb 2, 2019
2 parents 29365d1 + f62acb6 commit 82d8318
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 39 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change log for kotlinx.coroutines

## Version 1.1.1

* Maintenance release, no changes in the codebase
* Kotlin is updated to 1.3.20
* Gradle is updated to 4.10
* Native module is published with Gradle metadata v0.4

## Version 1.1.0

* Kotlin version updated to 1.3.11.
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.1.0) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.1.0)
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.1.1) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.1.1)

Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
This is a companion version for Kotlin `1.3.11` release.
This is a companion version for Kotlin `1.3.20` release.

**NOTE**: `0.30.2` was the last release with Kotlin 1.2 and experimental coroutines.
See [COMPATIBILITY.md](COMPATIBILITY.md) for details of migration onto the stable Kotlin 1.3 coroutines.
Expand Down Expand Up @@ -74,15 +74,15 @@ Add dependencies (you can also add other modules that you need):
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</dependency>
```

And make sure that you use the latest Kotlin version:

```xml
<properties>
<kotlin.version>1.3.11</kotlin.version>
<kotlin.version>1.3.20</kotlin.version>
</properties>
```

Expand All @@ -92,15 +92,15 @@ Add dependencies (you can also add other modules that you need):

```groovy
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1'
}
```

And make sure that you use the latest Kotlin version:

```groovy
buildscript {
ext.kotlin_version = '1.3.11'
ext.kotlin_version = '1.3.20'
}
```

Expand All @@ -118,15 +118,15 @@ Add dependencies (you can also add other modules that you need):

```groovy
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1")
}
```

And make sure that you use the latest Kotlin version:

```groovy
plugins {
kotlin("jvm") version "1.3.11"
kotlin("jvm") version "1.3.20"
}
```

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

```groovy
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1'
```
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)
coroutine dispatcher and also makes sure that in case of crashed coroutine with unhandled exception this
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ buildscript {
}
repositories {
jcenter()
maven { url "https://teamcity.jetbrains.com/guestAuth/app/rest/builds/id:1907319/artifacts/content/maven" }
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://kotlin.bintray.com/kotlin-dev" }
maven { url "https://kotlin.bintray.com/kotlin-eap" }
Expand Down Expand Up @@ -63,6 +64,7 @@ allprojects {
google()
}
jcenter()
maven { url "https://teamcity.jetbrains.com/guestAuth/app/rest/builds/id:1907319/artifacts/content/maven" }
maven { url "https://kotlin.bintray.com/kotlin-dev" }
maven { url "https://kotlin.bintray.com/kotlin-eap" }
maven { url "https://kotlin.bintray.com/kotlinx" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CancellableContinuationJvmTest : TestBase() {
private suspend fun checkToString() {
suspendCancellableCoroutine<Unit> {
it.resume(Unit)
assertTrue(it.toString().contains("kotlinx/coroutines/CancellableContinuationJvmTest.checkToString(CancellableContinuationJvmTest.kt"))
assertTrue(it.toString().contains("kotlinx.coroutines.CancellableContinuationJvmTest.checkToString(CancellableContinuationJvmTest.kt"))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class CoroutineSchedulerStressTest : TestBase() {

finishLatch.await()

require(blockingThread!! !in observedThreads)
require(!observedThreads.containsKey(blockingThread!!))
validateResults()
}

Expand Down
4 changes: 2 additions & 2 deletions core/kotlinx-coroutines-debug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ of coroutines hierarchy referenced by a [Job] or [CoroutineScope] instances usin
Add `kotlinx-coroutines-debug` to your project test dependencies:
```
dependencies {
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.1.0'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.1.1'
}
```

### Using as JVM agent

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


Expand Down
2 changes: 1 addition & 1 deletion core/kotlinx-coroutines-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Test utilities for `kotlinx.coroutines`. Provides `Dispatchers.setMain` to overr
Add `kotlinx-coroutines-test` to your project test dependencies:
```
dependencies {
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.1.0'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.1.1'
}
```

Expand Down
10 changes: 5 additions & 5 deletions docs/composing-suspending-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ Completed in 1085 ms
suspend fun concurrentSum(): Int = coroutineScope {
val one = async { doSomethingUsefulOne() }
val two = async { doSomethingUsefulTwo() }
one.await() + two.await()
one.await() + two.await()
}
```

Expand All @@ -350,18 +350,18 @@ import kotlinx.coroutines.*
import kotlin.system.*

fun main() = runBlocking<Unit> {
//sampleStart
//sampleStart
val time = measureTimeMillis {
println("The answer is ${concurrentSum()}")
}
println("Completed in $time ms")
//sampleEnd
//sampleEnd
}

suspend fun concurrentSum(): Int = coroutineScope {
val one = async { doSomethingUsefulOne() }
val two = async { doSomethingUsefulTwo() }
one.await() + two.await()
one.await() + two.await()
}

suspend fun doSomethingUsefulOne(): Int {
Expand Down Expand Up @@ -418,7 +418,7 @@ suspend fun failedConcurrentSum(): Int = coroutineScope {
println("Second child throws an exception")
throw ArithmeticException()
}
one.await() + two.await()
one.await() + two.await()
}
```

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Kotlin
version=1.1.0-SNAPSHOT
version=1.1.1-SNAPSHOT
group=org.jetbrains.kotlinx
kotlin_version=1.3.11
kotlin_native_version=1.3.11
kotlin_version=1.3.20
kotlin_native_version=1.3.20

# Dependencies
junit_version=4.12
atomicFU_version=0.12.0
atomicFU_version=0.12.1
html_version=0.6.8
lincheck_version=2.0
dokka_version=0.9.16-rdev-2-mpp-hacks
bintray_version=1.8.2-SNAPSHOT
bintray_version=1.8.4-jetbrains-5
byte_buddy_version=1.9.3
artifactory_plugin_version=4.7.3

Expand Down
5 changes: 1 addition & 4 deletions gradle/publish-bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ bintrayUpload.doFirst {
if (!isNative()) {
afterEvaluate {
publishing.publications.each { pub ->
pub.gradleModuleMetadataFile = null
tasks.matching { it.name == "generateMetadataFileFor${pub.name.capitalize()}Publication" }.all {
onlyIf { false }
}
pub.moduleDescriptorGenerator = null
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-4.7-bin.zip
distributionUrl=https\:https://services.gradle.org/distributions/gradle-4.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions integration/kotlinx-coroutines-jdk8/src/future/Future.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ public fun <T> CompletionStage<T>.asDeferred(): Deferred<T> {
} catch (e: Throwable) {
// unwrap original cause from ExecutionException
val original = (e as? ExecutionException)?.cause ?: e
CompletableDeferred<T>().also { it.cancel(original) }
CompletableDeferred<T>().also { it.completeExceptionally(original) }
}
}
val result = CompletableDeferred<T>()
whenComplete { value, exception ->
if (exception == null) {
result.complete(value)
} else {
result.cancel(exception)
result.completeExceptionally(exception)
}
}
if (this is Future<*>) result.cancelFutureOnCompletion(this)
Expand Down
2 changes: 1 addition & 1 deletion native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repositories {
}
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.1.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.1.1'
}
sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ internal actual fun <E> subscriberList(): MutableList<E> = CopyOnWriteList<E>()
internal actual fun <E> identitySet(expectedSize: Int): MutableSet<E> = HashSet()

@Suppress("ACTUAL_WITHOUT_EXPECT")
internal actual typealias SharedImmutable = kotlin.native.SharedImmutable
internal actual typealias SharedImmutable = kotlin.native.concurrent.SharedImmutable
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package kotlinx.coroutines.internal
import kotlin.native.concurrent.*

@Suppress("ACTUAL_WITHOUT_EXPECT")
internal actual typealias NativeThreadLocal = kotlin.native.ThreadLocal
internal actual typealias NativeThreadLocal = kotlin.native.concurrent.ThreadLocal

internal actual class CommonThreadLocal<T> actual constructor() {
private var value: T? = null
Expand Down
2 changes: 1 addition & 1 deletion ui/coroutines-guide-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fun setup(hello: TextView, fab: FloatingActionButton) {
部分中添加 `kotlinx-coroutines-android` 模块的依赖:

```groovy
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1"
```

你可以在 Github 上 clone [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) 这个项目到你的<!--
Expand Down
4 changes: 2 additions & 2 deletions ui/kotlinx-coroutines-android/animation-app/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ org.gradle.jvmargs=-Xmx1536m

kotlin.coroutines=enable

kotlin_version=1.3.11
coroutines_version=1.1.0
kotlin_version=1.3.20
coroutines_version=1.1.1

4 changes: 2 additions & 2 deletions ui/kotlinx-coroutines-android/example-app/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ org.gradle.jvmargs=-Xmx1536m

kotlin.coroutines=enable

kotlin_version=1.3.11
coroutines_version=1.1.0
kotlin_version=1.3.20
coroutines_version=1.1.1

0 comments on commit 82d8318

Please sign in to comment.