From 31671664a0d466f93dc92a270d572466631190e0 Mon Sep 17 00:00:00 2001 From: Roman Elizarov Date: Thu, 23 Aug 2018 18:51:54 +0300 Subject: [PATCH 1/9] Fixed final step of release procedure (merge origin/master) --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 74054bcbf2..0d99d3c506 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -68,7 +68,7 @@ To release new `` of `kotlinx-coroutines`: `git fetch` 8. Merge release from `master`:
- `git merge master` + `git merge origin/master` 9. Push updates to `develop`:
`git push` From 9885f7dda1cd28c96182380aecf2f8efbcc54f67 Mon Sep 17 00:00:00 2001 From: Roman Elizarov Date: Thu, 23 Aug 2018 18:52:44 +0300 Subject: [PATCH 2/9] Specify explicit type of IO val --- core/kotlinx-coroutines-core/src/CoroutineContext.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/kotlinx-coroutines-core/src/CoroutineContext.kt b/core/kotlinx-coroutines-core/src/CoroutineContext.kt index fd6ced5015..39367f473c 100644 --- a/core/kotlinx-coroutines-core/src/CoroutineContext.kt +++ b/core/kotlinx-coroutines-core/src/CoroutineContext.kt @@ -81,7 +81,7 @@ public const val IO_PARALLELISM_PROPERTY_NAME = "kotlinx.coroutines.io.paralleli * "`kotlinx.coroutines.io.parallelism`" ([IO_PARALLELISM_PROPERTY_NAME]) system property. * It defaults to the limit of 64 threads or the number of cores (whichever is larger). */ -public val IO by lazy { +public val IO: CoroutineDispatcher by lazy { BackgroundDispatcher.blocking(systemProp(IO_PARALLELISM_PROPERTY_NAME, 64.coerceAtLeast(AVAILABLE_PROCESSORS))) } From 6790f15ba06167113cd661f3e2345cc77edc9371 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Fri, 24 Aug 2018 15:24:40 +0300 Subject: [PATCH 3/9] Update missing copyrights --- .../src/jmh/kotlin/benchmarks/ForkJoinBenchmark.kt | 4 ++++ .../src/jmh/kotlin/benchmarks/LaunchBenchmark.kt | 4 ++++ .../benchmarks/ParametrizedDispatcherBase.kt | 4 ++++ .../kotlin/benchmarks/StatefulAwaitsBenchmark.kt | 4 ++++ .../actors/ConcurrentStatefulActorBenchmark.kt | 4 ++++ .../benchmarks/actors/CycledActorsBenchmark.kt | 4 ++++ .../benchmarks/actors/PingPongActorBenchmark.kt | 4 ++++ .../benchmarks/actors/PingPongAkkaBenchmark.kt | 4 ++++ .../actors/PingPongWithBlockingContext.kt | 4 ++++ .../actors/StatefulActorAkkaBenchmark.kt | 4 ++++ .../benchmarks/actors/StatefulActorBenchmark.kt | 4 ++++ .../src/internal/ThreadContext.kt | 4 ++++ .../test/ThreadLocalTest.kt | 3 +++ .../test/WithDefaultContextTest.kt | 14 +------------- .../test/WithTimeoutJvmTest.kt | 4 ++++ .../test/channels/ChannelLinearizabilityTest.kt | 3 --- .../BlockingCoroutineDispatcherRaceStressTest.kt | 4 ++++ .../scheduling/BlockingCoroutineDispatcherTest.kt | 4 ++++ .../scheduling/CoroutineSchedulerShrinkTest.kt | 4 ++++ .../LimitingCoroutineDispatcherStressTest.kt | 4 ++++ .../test/scheduling/LimitingDispatcherTest.kt | 4 ++++ 21 files changed, 76 insertions(+), 16 deletions(-) diff --git a/benchmarks/src/jmh/kotlin/benchmarks/ForkJoinBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/ForkJoinBenchmark.kt index eaca9a34d8..e05ff85fc9 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/ForkJoinBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/ForkJoinBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks import benchmarks.ForkJoinBenchmark.Companion.BATCH_SIZE diff --git a/benchmarks/src/jmh/kotlin/benchmarks/LaunchBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/LaunchBenchmark.kt index 684aa80ed3..6cf1fbd0b4 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/LaunchBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/LaunchBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks import kotlinx.coroutines.experimental.launch diff --git a/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt b/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt index 0436d4c743..bfe9a46db4 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks import benchmarks.actors.CORES_COUNT diff --git a/benchmarks/src/jmh/kotlin/benchmarks/StatefulAwaitsBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/StatefulAwaitsBenchmark.kt index 0e94b5cc6f..091fa0663d 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/StatefulAwaitsBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/StatefulAwaitsBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks import kotlinx.coroutines.experimental.* diff --git a/benchmarks/src/jmh/kotlin/benchmarks/actors/ConcurrentStatefulActorBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/actors/ConcurrentStatefulActorBenchmark.kt index 5d184a469e..d3766aa586 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/actors/ConcurrentStatefulActorBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/actors/ConcurrentStatefulActorBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks.actors import benchmarks.ParametrizedDispatcherBase diff --git a/benchmarks/src/jmh/kotlin/benchmarks/actors/CycledActorsBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/actors/CycledActorsBenchmark.kt index baa62ccb49..2e21600d36 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/actors/CycledActorsBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/actors/CycledActorsBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks.actors import benchmarks.ParametrizedDispatcherBase diff --git a/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongActorBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongActorBenchmark.kt index 221d9acfac..d8491a8389 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongActorBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongActorBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks.actors import benchmarks.* diff --git a/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongAkkaBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongAkkaBenchmark.kt index 7a64d81be1..6b71e35f8a 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongAkkaBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongAkkaBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks.actors import akka.actor.ActorRef diff --git a/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongWithBlockingContext.kt b/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongWithBlockingContext.kt index 4e566a422f..42ce78cc96 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongWithBlockingContext.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/actors/PingPongWithBlockingContext.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks.actors import kotlinx.coroutines.experimental.* diff --git a/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorAkkaBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorAkkaBenchmark.kt index 1b7fc6d56d..c19c91fa81 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorAkkaBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorAkkaBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks.actors import akka.actor.ActorRef diff --git a/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorBenchmark.kt b/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorBenchmark.kt index 7115272b18..91b3cf69ea 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorBenchmark.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/actors/StatefulActorBenchmark.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package benchmarks.actors import benchmarks.ParametrizedDispatcherBase diff --git a/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt b/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt index abee55b749..a8ab6dadd9 100644 --- a/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt +++ b/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package kotlinx.coroutines.experimental.internal import kotlinx.coroutines.experimental.* diff --git a/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt b/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt index b932e75456..f3a6c40234 100644 --- a/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt +++ b/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt @@ -1,3 +1,6 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ package kotlinx.coroutines.experimental diff --git a/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt b/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt index 48b171a8ab..901a957c19 100644 --- a/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt +++ b/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt @@ -1,17 +1,5 @@ /* - * Copyright 2016-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ package kotlinx.coroutines.experimental diff --git a/core/kotlinx-coroutines-core/test/WithTimeoutJvmTest.kt b/core/kotlinx-coroutines-core/test/WithTimeoutJvmTest.kt index f9540e1eac..538cf70665 100644 --- a/core/kotlinx-coroutines-core/test/WithTimeoutJvmTest.kt +++ b/core/kotlinx-coroutines-core/test/WithTimeoutJvmTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + import kotlinx.coroutines.experimental.* import kotlinx.coroutines.experimental.exceptions.* import java.io.* diff --git a/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt b/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt index 989435efae..a80defc833 100644 --- a/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt +++ b/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt @@ -1,9 +1,6 @@ /* * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -/* - * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ package kotlinx.coroutines.experimental.channels diff --git a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt index 06957ff733..adbeb33bca 100644 --- a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt +++ b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package kotlinx.coroutines.experimental.scheduling import kotlinx.coroutines.experimental.* diff --git a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt index 5453ad8d6d..28a7859a01 100644 --- a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt +++ b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package kotlinx.coroutines.experimental.scheduling import kotlinx.coroutines.experimental.* diff --git a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt index d2e47f49ad..e20dcdc494 100644 --- a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt +++ b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package kotlinx.coroutines.experimental.scheduling import kotlinx.coroutines.experimental.* diff --git a/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt index f8b9aa2d87..27a141f4c7 100644 --- a/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt +++ b/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package kotlinx.coroutines.experimental.scheduling import kotlinx.atomicfu.* diff --git a/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt b/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt index faf50dc300..4524f0ea8a 100644 --- a/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt +++ b/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt @@ -1,3 +1,7 @@ +/* + * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + package kotlinx.coroutines.experimental.scheduling import kotlinx.coroutines.experimental.* From d2a4011f7a45f5fe8169e25513b762866671ce79 Mon Sep 17 00:00:00 2001 From: Dmitry Borodin Date: Fri, 24 Aug 2018 14:24:02 +0200 Subject: [PATCH 4/9] typo fixed --- native/kotlinx-coroutines-core-native/src/EventLoop.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/kotlinx-coroutines-core-native/src/EventLoop.kt b/native/kotlinx-coroutines-core-native/src/EventLoop.kt index 9e4c3a34aa..e3a922750d 100644 --- a/native/kotlinx-coroutines-core-native/src/EventLoop.kt +++ b/native/kotlinx-coroutines-core-native/src/EventLoop.kt @@ -53,7 +53,7 @@ internal abstract class EventLoopBase: CoroutineDispatcher(), Delay, EventLoop { // null | CLOSED_EMPTY | task | Queue private val _queue = atomic(null) - // Allocated only only once + // Allocated only once private val _delayed = atomic?>(null) protected abstract val isCompleted: Boolean From 3da8ea8b513b7f8ad72ecf1c49396326f25a84f5 Mon Sep 17 00:00:00 2001 From: Roman Elizarov Date: Sat, 25 Aug 2018 19:36:51 +0300 Subject: [PATCH 5/9] Android examples: Gradle Version 4.9, Android Gradle Tools version 3.3.0-alpha04 Fixes #512 --- .../animation-app/app/build.gradle | 9 +++++---- .../animation-app/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../example-app/app/build.gradle | 19 ++++++++++--------- .../example-app/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 4 ++-- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/ui/kotlinx-coroutines-android/animation-app/app/build.gradle b/ui/kotlinx-coroutines-android/animation-app/app/build.gradle index a32834eea0..25106ffa88 100644 --- a/ui/kotlinx-coroutines-android/animation-app/app/build.gradle +++ b/ui/kotlinx-coroutines-android/animation-app/app/build.gradle @@ -4,9 +4,10 @@ apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 27 + buildToolsVersion '27.0.3' defaultConfig { applicationId "org.jetbrains.kotlinx.animation" - minSdkVersion 15 + minSdkVersion 14 targetSdkVersion 27 versionCode 1 versionName "1.0" @@ -21,12 +22,12 @@ android { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:design:27.1.1' - implementation "android.arch.lifecycle:extensions:1.1.1" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" + implementation 'android.arch.lifecycle:extensions:1.1.1' + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" testImplementation 'junit:junit:4.12' diff --git a/ui/kotlinx-coroutines-android/animation-app/build.gradle b/ui/kotlinx-coroutines-android/animation-app/build.gradle index 53e41017d1..9181f0206c 100644 --- a/ui/kotlinx-coroutines-android/animation-app/build.gradle +++ b/ui/kotlinx-coroutines-android/animation-app/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.3.0-alpha04' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/ui/kotlinx-coroutines-android/animation-app/gradle/wrapper/gradle-wrapper.properties b/ui/kotlinx-coroutines-android/animation-app/gradle/wrapper/gradle-wrapper.properties index b55a16b491..f44ff590a5 100644 --- a/ui/kotlinx-coroutines-android/animation-app/gradle/wrapper/gradle-wrapper.properties +++ b/ui/kotlinx-coroutines-android/animation-app/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Apr 08 11:05:03 CEST 2018 +#Sat Aug 25 19:20:16 MSK 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip diff --git a/ui/kotlinx-coroutines-android/example-app/app/build.gradle b/ui/kotlinx-coroutines-android/example-app/app/build.gradle index e6430751b9..33e1337611 100644 --- a/ui/kotlinx-coroutines-android/example-app/app/build.gradle +++ b/ui/kotlinx-coroutines-android/example-app/app/build.gradle @@ -22,13 +22,14 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:27.1.1' - compile 'com.android.support.constraint:constraint-layout:1.0.2' - compile 'com.android.support:design:27.1.1' - compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" - testCompile 'junit:junit:4.12' - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) + implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support.constraint:constraint-layout:1.0.2' + implementation 'com.android.support:design:27.1.1' + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" + + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.1' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' } diff --git a/ui/kotlinx-coroutines-android/example-app/build.gradle b/ui/kotlinx-coroutines-android/example-app/build.gradle index 53e41017d1..9181f0206c 100644 --- a/ui/kotlinx-coroutines-android/example-app/build.gradle +++ b/ui/kotlinx-coroutines-android/example-app/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.3.0-alpha04' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/ui/kotlinx-coroutines-android/example-app/gradle/wrapper/gradle-wrapper.properties b/ui/kotlinx-coroutines-android/example-app/gradle/wrapper/gradle-wrapper.properties index 485ca2ca57..f44ff590a5 100644 --- a/ui/kotlinx-coroutines-android/example-app/gradle/wrapper/gradle-wrapper.properties +++ b/ui/kotlinx-coroutines-android/example-app/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Apr 08 03:14:27 CEST 2018 +#Sat Aug 25 19:20:16 MSK 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip From 1acb67abfc2d71aff575f4747a000378da21b0cf Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Wed, 29 Aug 2018 15:28:51 +0300 Subject: [PATCH 6/9] Unify gradle.properties --- gradle.properties | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/gradle.properties b/gradle.properties index b88a7ca4d4..1244a18387 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,25 +1,24 @@ -# -# Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. -# - +# Kotlin version = 0.25.0-SNAPSHOT group = org.jetbrains.kotlinx +kotlin_version=1.2.61 +kotlin_native_version=0.8.2 -kotlin_version = 1.2.61 -kotlin_native_version = 0.8.2 -junit_version = 4.12 -atomicFU_version = 0.11.3 -html_version = 0.6.8 +# Dependencies +junit_version=4.12 +atomicFU_version=0.11.3 +html_version=0.6.8 lincheck_version=1.9 -dokka_version = 0.9.16-rdev-2-mpp-hacks -bintray_version = 1.8.2-SNAPSHOT +dokka_version=0.9.16-rdev-2-mpp-hacks +bintray_version=1.8.2-SNAPSHOT -gradle_node_version = 1.2.0 -node_version = 8.9.3 -npm_version = 5.7.1 -mocha_version = 4.1.0 -mocha_headless_chrome_version = 1.8.2 -mocha_teamcity_reporter_version = 2.2.2 -source_map_support_version = 0.5.3 +# JS +gradle_node_version=1.2.0 +node_version=8.9.3 +npm_version=5.7.1 +mocha_version=4.1.0 +mocha_headless_chrome_version=1.8.2 +mocha_teamcity_reporter_version=2.2.2 +source_map_support_version=0.5.3 kotlin.incremental.multiplatform=true \ No newline at end of file From 1740ec73152098c4c60f5e6fefdd3b30a6907c66 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Thu, 30 Aug 2018 12:41:24 +0300 Subject: [PATCH 7/9] Fix package name --- .../test/channels/InvokeOnCloseStressTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt b/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt index 2a0f6dfa8f..102e3d26e6 100644 --- a/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt +++ b/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt @@ -2,7 +2,7 @@ * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -package channels +package kotlinx.coroutines.experimental.channels import kotlinx.coroutines.experimental.* import kotlinx.coroutines.experimental.channels.* From dc5c7feffaa2bfdae5aa2ef8b129ec9a97ed09dc Mon Sep 17 00:00:00 2001 From: Roman Elizarov Date: Fri, 31 Aug 2018 15:05:54 +0300 Subject: [PATCH 8/9] AtomicFu version 0.11.4: Back to default FU variant and JS transform * Distribution no longer uses multi-version jar (unsuppored on Android) * JS version of the library does not deneds on AtomicFu: All the atomic boxes in JS are fully erased. Fixes #510 --- gradle.properties | 2 +- gradle/atomicfu-js.gradle | 5 ++++- js/kotlinx-coroutines-core-js/npm/package.json | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1244a18387..cfecfa69e3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ kotlin_native_version=0.8.2 # Dependencies junit_version=4.12 -atomicFU_version=0.11.3 +atomicFU_version=0.11.4 html_version=0.6.8 lincheck_version=1.9 dokka_version=0.9.16-rdev-2-mpp-hacks diff --git a/gradle/atomicfu-js.gradle b/gradle/atomicfu-js.gradle index ef589a2e4d..b1375a95c9 100644 --- a/gradle/atomicfu-js.gradle +++ b/gradle/atomicfu-js.gradle @@ -2,6 +2,9 @@ * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ +apply plugin: 'kotlinx-atomicfu' + dependencies { - compile "org.jetbrains.kotlinx:atomicfu-js:$atomicFU_version" + compileOnly "org.jetbrains.kotlinx:atomicfu-js:$atomicFU_version" + testCompile "org.jetbrains.kotlinx:atomicfu-js:$atomicFU_version" } diff --git a/js/kotlinx-coroutines-core-js/npm/package.json b/js/kotlinx-coroutines-core-js/npm/package.json index 861b1010c3..5dda39433d 100644 --- a/js/kotlinx-coroutines-core-js/npm/package.json +++ b/js/kotlinx-coroutines-core-js/npm/package.json @@ -20,9 +20,6 @@ "JavaScript", "JetBrains" ], - "dependencies": { - "kotlinx-atomicfu": "$atomicFU_version" - }, "peerDependencies": { $kotlinDependency } From 97ac6b0d1a5dba0ebf65f7619df49084b6a905cb Mon Sep 17 00:00:00 2001 From: Roman Elizarov Date: Tue, 4 Sep 2018 14:16:48 +0300 Subject: [PATCH 9/9] Version 0.25.2 --- CHANGES.md | 6 ++++++ README.md | 8 ++++---- gradle.properties | 2 +- native/README.md | 2 +- ui/coroutines-guide-ui.md | 2 +- .../animation-app/gradle.properties | 2 +- .../example-app/gradle.properties | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9cd40f68b7..3ae8d8fa84 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change log for kotlinx.coroutines +## Version 0.25.2 + +* Distribution no longer uses multi-version jar which is not supported on Android (see #510). +* JS version of the library does not depend on AtomicFu anymore: +  All the atomic boxes in JS are fully erased. + ## Version 0.25.0 * Major rework on exception-handling and cancellation in coroutines (see #333, #452 and #451): diff --git a/README.md b/README.md index 824929a326..2aa3125737 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![official JetBrains project](http://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)](http://www.apache.org/licenses/LICENSE-2.0) -[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=0.25.0) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/0.25.0) +[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=0.25.2) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/0.25.2) Library support for Kotlin coroutines with [multiplatform](#multiplatform) support. This is a companion version for Kotlin 1.2.61 release. @@ -63,7 +63,7 @@ Add dependencies (you can also add other modules that you need): org.jetbrains.kotlinx kotlinx-coroutines-core - 0.25.0 + 0.25.2 ``` @@ -80,7 +80,7 @@ And make sure that you use the latest Kotlin version: Add dependencies (you can also add other modules that you need): ```groovy -implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.25.0' +implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.25.2' ``` And make sure that you use the latest Kotlin version: @@ -113,7 +113,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:0.25.0' +implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.25.2' ``` This gives you access to Android [UI](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/kotlinx.coroutines.experimental.android/-u-i.html) diff --git a/gradle.properties b/gradle.properties index cfecfa69e3..319829c9c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Kotlin -version = 0.25.0-SNAPSHOT +version = 0.25.2-SNAPSHOT group = org.jetbrains.kotlinx kotlin_version=1.2.61 kotlin_native_version=0.8.2 diff --git a/native/README.md b/native/README.md index 8aae568d54..14233fd6ed 100644 --- a/native/README.md +++ b/native/README.md @@ -42,7 +42,7 @@ repositories { } dependencies { - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:0.25.0' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:0.25.2' } sourceSets { diff --git a/ui/coroutines-guide-ui.md b/ui/coroutines-guide-ui.md index e44fb03660..4d5037ba95 100644 --- a/ui/coroutines-guide-ui.md +++ b/ui/coroutines-guide-ui.md @@ -161,7 +161,7 @@ Add dependencies on `kotlinx-coroutines-android` module to the `dependencies { . `app/build.gradle` file: ```groovy -compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.25.0" +compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.25.2" ``` Coroutines are experimental feature in Kotlin. diff --git a/ui/kotlinx-coroutines-android/animation-app/gradle.properties b/ui/kotlinx-coroutines-android/animation-app/gradle.properties index ac30b17b91..d27139c655 100644 --- a/ui/kotlinx-coroutines-android/animation-app/gradle.properties +++ b/ui/kotlinx-coroutines-android/animation-app/gradle.properties @@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m kotlin.coroutines=enable kotlin_version = 1.2.61 -coroutines_version = 0.25.0 +coroutines_version = 0.25.2 diff --git a/ui/kotlinx-coroutines-android/example-app/gradle.properties b/ui/kotlinx-coroutines-android/example-app/gradle.properties index ac30b17b91..d27139c655 100644 --- a/ui/kotlinx-coroutines-android/example-app/gradle.properties +++ b/ui/kotlinx-coroutines-android/example-app/gradle.properties @@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m kotlin.coroutines=enable kotlin_version = 1.2.61 -coroutines_version = 0.25.0 +coroutines_version = 0.25.2