From 2ea0414b1b9e6e810add7b89438fe5a406df1b95 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Wed, 15 Jun 2022 18:20:15 +0300 Subject: [PATCH 01/11] Update Kotlin to 1.7.0 --- README.md | 14 +++++++------- gradle.properties | 2 +- kotlinx-coroutines-core/build.gradle | 2 +- .../internal/LockFreeLinkedListLongStressTest.kt | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 395682d95f..f4795d9b2f 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ [![Kotlin Stable](https://kotl.in/badges/stable.svg)](https://kotlinlang.org/docs/components-stability.html) [![JetBrains official 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://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.3)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.3/pom) -[![Kotlin](https://img.shields.io/badge/kotlin-1.6.21-blue.svg?logo=kotlin)](http://kotlinlang.org) +[![Download](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.2)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.2/pom) +[![Kotlin](https://img.shields.io/badge/kotlin-1.6.0-blue.svg?logo=kotlin)](http://kotlinlang.org) [![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/coroutines/) Library support for Kotlin coroutines with [multiplatform](#multiplatform) support. -This is a companion version for the Kotlin `1.6.21` release. +This is a companion version for the Kotlin `1.7.10` release. ```kotlin suspend fun main() = coroutineScope { @@ -84,7 +84,7 @@ Add dependencies (you can also add other modules that you need): org.jetbrains.kotlinx kotlinx-coroutines-core - 1.6.3 + 1.6.2 ``` @@ -92,7 +92,7 @@ And make sure that you use the latest Kotlin version: ```xml - 1.6.21 + 1.7.10 ``` @@ -111,10 +111,10 @@ And make sure that you use the latest Kotlin version: ```kotlin plugins { // For build.gradle.kts (Kotlin DSL) - kotlin("jvm") version "1.6.21" + kotlin("jvm") version "1.7.10" // For build.gradle (Groovy DSL) - id "org.jetbrains.kotlin.jvm" version "1.6.21" + id "org.jetbrains.kotlin.jvm" version "1.7.10" } ``` diff --git a/gradle.properties b/gradle.properties index 63fdf28c62..5c24b38bba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ # Kotlin version=1.6.3-SNAPSHOT group=org.jetbrains.kotlinx -kotlin_version=1.6.21 +kotlin_version=1.7.0 # Dependencies junit_version=4.12 diff --git a/kotlinx-coroutines-core/build.gradle b/kotlinx-coroutines-core/build.gradle index 9791b445bf..ede3255831 100644 --- a/kotlinx-coroutines-core/build.gradle +++ b/kotlinx-coroutines-core/build.gradle @@ -290,7 +290,7 @@ tasks.koverVerify { task testsJar(type: Jar, dependsOn: jvmTestClasses) { classifier = 'tests' - from compileTestKotlinJvm.destinationDir + from(compileTestKotlinJvm.destinationDirectory) } artifacts { diff --git a/kotlinx-coroutines-core/jvm/test/internal/LockFreeLinkedListLongStressTest.kt b/kotlinx-coroutines-core/jvm/test/internal/LockFreeLinkedListLongStressTest.kt index a70a32b5d3..7e1b0c6d07 100644 --- a/kotlinx-coroutines-core/jvm/test/internal/LockFreeLinkedListLongStressTest.kt +++ b/kotlinx-coroutines-core/jvm/test/internal/LockFreeLinkedListLongStressTest.kt @@ -70,4 +70,4 @@ class LockFreeLinkedListLongStressTest : TestBase() { } require(!expected.hasNext()) } -} \ No newline at end of file +} From cbcf4c537d883b9df640b86ee043f6d1072373ad Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Thu, 16 Jun 2022 18:07:53 +0300 Subject: [PATCH 02/11] WA for broken atomicfu compiler plugin dependency in kotlin 1.7.0 (#232) --- build.gradle | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/build.gradle b/build.gradle index 649434bba8..d8b6569383 100644 --- a/build.gradle +++ b/build.gradle @@ -3,11 +3,13 @@ */ +import org.gradle.api.internal.artifacts.repositories.resolver.DefaultMutableVariantFilesMetadata import org.jetbrains.kotlin.config.KotlinCompilerVersion import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile import org.jetbrains.kotlin.konan.target.HostManager import org.jetbrains.dokka.gradle.DokkaTaskPartial +import org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute import static Projects.* @@ -180,6 +182,31 @@ configure(subprojects.findAll { !sourceless.contains(it.name) }) { // Remove null assertions to get smaller bytecode on Android kotlinOptions.freeCompilerArgs += ["-Xno-param-assertions", "-Xno-receiver-assertions", "-Xno-call-assertions"] } + + dependencies { + components { + it.withModule("org.jetbrains.kotlin:atomicfu") { + def componentMetadataDetails = it as ComponentMetadataDetails + componentMetadataDetails.withVariant("runtimeElements") { + def runtimeElementsVariant = it as VariantMetadata + componentMetadataDetails.addVariant("runtimeJsIrElements") { + def runtimeJsIrElementsVariant = it + runtimeElementsVariant.attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) + runtimeElementsVariant.attributes.attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, KotlinJsCompilerAttribute.ir) + runtimeElementsVariant.attributes.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage, Usage.JAVA_RUNTIME)) + runtimeElementsVariant.withFiles { + def runtimeElementsFiles = it as DefaultMutableVariantFilesMetadata + runtimeJsIrElementsVariant.withFiles { + runtimeElementsFiles.files.forEach { + addFile(it.name) + } + } + } + } + } + } + } + } } if (build_snapshot_train) { From 4f2329e1f8e4c00180f8e81b7701e27a342de999 Mon Sep 17 00:00:00 2001 From: Alexander Likhachev Date: Thu, 16 Jun 2022 20:24:13 +0300 Subject: [PATCH 03/11] WA for broken atomicfu compiler plugin dependency in kotlin 1.7.0 --- build.gradle | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index d8b6569383..916c84648b 100644 --- a/build.gradle +++ b/build.gradle @@ -182,31 +182,6 @@ configure(subprojects.findAll { !sourceless.contains(it.name) }) { // Remove null assertions to get smaller bytecode on Android kotlinOptions.freeCompilerArgs += ["-Xno-param-assertions", "-Xno-receiver-assertions", "-Xno-call-assertions"] } - - dependencies { - components { - it.withModule("org.jetbrains.kotlin:atomicfu") { - def componentMetadataDetails = it as ComponentMetadataDetails - componentMetadataDetails.withVariant("runtimeElements") { - def runtimeElementsVariant = it as VariantMetadata - componentMetadataDetails.addVariant("runtimeJsIrElements") { - def runtimeJsIrElementsVariant = it - runtimeElementsVariant.attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) - runtimeElementsVariant.attributes.attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, KotlinJsCompilerAttribute.ir) - runtimeElementsVariant.attributes.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage, Usage.JAVA_RUNTIME)) - runtimeElementsVariant.withFiles { - def runtimeElementsFiles = it as DefaultMutableVariantFilesMetadata - runtimeJsIrElementsVariant.withFiles { - runtimeElementsFiles.files.forEach { - addFile(it.name) - } - } - } - } - } - } - } - } } if (build_snapshot_train) { @@ -381,4 +356,29 @@ allprojects { subProject -> "triggering all sort of incompatible class changes errors") } } + + dependencies { + components { component -> + component.withModule("org.jetbrains.kotlin:atomicfu") { ComponentMetadataDetails componentMetadataDetails -> + componentMetadataDetails.withVariant("runtimeElements") { VariantMetadata runtimeElementsVariant -> + [KotlinJsCompilerAttribute.legacy, KotlinJsCompilerAttribute.ir].forEach { jsType -> + componentMetadataDetails.addVariant("runtimeJs${jsType.name().capitalize()}Elements") { jsVariant -> + jsVariant.attributes { + it.attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) + it.attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, jsType) + it.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage, Usage.JAVA_RUNTIME)) + } + runtimeElementsVariant.withFiles { DefaultMutableVariantFilesMetadata runtimeElementsFiles -> + jsVariant.withFiles { + runtimeElementsFiles.files.forEach { file -> + addFile(file.name) + } + } + } + } + } + } + } + } + } } From 27020a6c2d300f0c3c1b9a24a917c0ec86c6a68b Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Tue, 21 Jun 2022 12:58:38 +0300 Subject: [PATCH 04/11] Update atomicfu, disable ir transformation --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5c24b38bba..6005588772 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ kotlin_version=1.7.0 # Dependencies junit_version=4.12 junit5_version=5.7.0 -atomicfu_version=0.17.3 +atomicfu_version=0.18.0 knit_version=0.4.0 html_version=0.7.2 lincheck_version=2.14 @@ -58,4 +58,4 @@ org.gradle.jvmargs=-Xmx3g kotlin.mpp.enableCompatibilityMetadataVariant=true kotlin.mpp.stability.nowarn=true -kotlinx.atomicfu.enableIrTransformation=true +kotlinx.atomicfu.enableIrTransformation=false From 5dee93e202311bdad3de50f4f7426d3e45254967 Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Fri, 8 Jul 2022 14:41:04 +0200 Subject: [PATCH 05/11] Update Kotlin to 1.7.10 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6005588772..b49612f3c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ # Kotlin version=1.6.3-SNAPSHOT group=org.jetbrains.kotlinx -kotlin_version=1.7.0 +kotlin_version=1.7.10 # Dependencies junit_version=4.12 From 89313237b67f396a75d250620a1cc5df9b56d7a0 Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Fri, 8 Jul 2022 14:41:24 +0200 Subject: [PATCH 06/11] Update atomicfu to 0.18.2 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b49612f3c7..deab11fea1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ kotlin_version=1.7.10 # Dependencies junit_version=4.12 junit5_version=5.7.0 -atomicfu_version=0.18.0 +atomicfu_version=0.18.2 knit_version=0.4.0 html_version=0.7.2 lincheck_version=2.14 From 9afc2059d8f409d850ce44db0a27a892cfd0d8be Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Fri, 8 Jul 2022 15:22:38 +0200 Subject: [PATCH 07/11] Turn on IR transformation --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index deab11fea1..2f6c5eea74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -58,4 +58,4 @@ org.gradle.jvmargs=-Xmx3g kotlin.mpp.enableCompatibilityMetadataVariant=true kotlin.mpp.stability.nowarn=true -kotlinx.atomicfu.enableIrTransformation=false +kotlinx.atomicfu.enableIrTransformation=true From 4cb5db0d3ef03d769825d6391fced3a88b8c67b4 Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Fri, 8 Jul 2022 16:12:29 +0200 Subject: [PATCH 08/11] Remove unnecessary WA --- build.gradle | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/build.gradle b/build.gradle index 916c84648b..649434bba8 100644 --- a/build.gradle +++ b/build.gradle @@ -3,13 +3,11 @@ */ -import org.gradle.api.internal.artifacts.repositories.resolver.DefaultMutableVariantFilesMetadata import org.jetbrains.kotlin.config.KotlinCompilerVersion import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile import org.jetbrains.kotlin.konan.target.HostManager import org.jetbrains.dokka.gradle.DokkaTaskPartial -import org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute import static Projects.* @@ -356,29 +354,4 @@ allprojects { subProject -> "triggering all sort of incompatible class changes errors") } } - - dependencies { - components { component -> - component.withModule("org.jetbrains.kotlin:atomicfu") { ComponentMetadataDetails componentMetadataDetails -> - componentMetadataDetails.withVariant("runtimeElements") { VariantMetadata runtimeElementsVariant -> - [KotlinJsCompilerAttribute.legacy, KotlinJsCompilerAttribute.ir].forEach { jsType -> - componentMetadataDetails.addVariant("runtimeJs${jsType.name().capitalize()}Elements") { jsVariant -> - jsVariant.attributes { - it.attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) - it.attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, jsType) - it.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage, Usage.JAVA_RUNTIME)) - } - runtimeElementsVariant.withFiles { DefaultMutableVariantFilesMetadata runtimeElementsFiles -> - jsVariant.withFiles { - runtimeElementsFiles.files.forEach { file -> - addFile(file.name) - } - } - } - } - } - } - } - } - } } From c9093e2564c677ac26de291eac2580072c303c95 Mon Sep 17 00:00:00 2001 From: Margarita Bobova Date: Wed, 29 Jun 2022 11:25:31 +0200 Subject: [PATCH 09/11] Add atomicfu to classpath --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 649434bba8..f331f90518 100644 --- a/build.gradle +++ b/build.gradle @@ -58,6 +58,7 @@ buildscript { classpath "org.jetbrains.kotlinx:binary-compatibility-validator:$binary_compatibility_validator_version" classpath "ru.vyarus:gradle-animalsniffer-plugin:1.5.4" // Android API check classpath "org.jetbrains.kotlinx:kover:$kover_version" + classpath "org.jetbrains.kotlin:atomicfu:$kotlin_version" // JMH plugins classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2" From 98d8eb837ef2dee5f9937404694bb976b14f8f91 Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Mon, 11 Jul 2022 12:48:00 +0200 Subject: [PATCH 10/11] Update Kotlin for Integration test --- integration-testing/build.gradle | 4 +--- integration-testing/gradle.properties | 2 +- integration-testing/settings.gradle | 2 +- .../jvm/resources/DebugProbesKt.bin | Bin 1738 -> 1733 bytes 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/integration-testing/build.gradle b/integration-testing/build.gradle index c23d35fbe7..191ffcfa3e 100644 --- a/integration-testing/build.gradle +++ b/integration-testing/build.gradle @@ -2,10 +2,8 @@ * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ -import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType - plugins { - id "org.jetbrains.kotlin.jvm" + id "org.jetbrains.kotlin.jvm" version "1.7.10" } repositories { diff --git a/integration-testing/gradle.properties b/integration-testing/gradle.properties index 1f334cafea..450771e4f4 100644 --- a/integration-testing/gradle.properties +++ b/integration-testing/gradle.properties @@ -1,4 +1,4 @@ -kotlin_version=1.6.21 +kotlin_version=1.7.10 coroutines_version=1.6.3-SNAPSHOT kotlin.code.style=official diff --git a/integration-testing/settings.gradle b/integration-testing/settings.gradle index 67336c9880..689813e90b 100644 --- a/integration-testing/settings.gradle +++ b/integration-testing/settings.gradle @@ -1,7 +1,7 @@ pluginManagement { resolutionStrategy { eachPlugin { - if (requested.id.id == "org.jetbrains.kotlin.multiplatform" || requested.id.id == "org.jetbrains.kotlin.jvm") { + if (requested.id.id == "org.jetbrains.kotlin.multiplatform") { useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") } } diff --git a/kotlinx-coroutines-core/jvm/resources/DebugProbesKt.bin b/kotlinx-coroutines-core/jvm/resources/DebugProbesKt.bin index a6ea0a40e53b7f45e1792c1f1edd5ba3d246f546..4c3babb1db15a06d31f0457dababc98c1fe836fc 100644 GIT binary patch delta 320 zcmZ{dO=`k$5XFE0gqS9%h>I3uYZiiFtlHMkey-~oTzQ5$KzoO5y+pK#xNxOVJXGnZ z1*_oV@!l{qzqiS(Gydjhu>{(@CH|Lf-08|58`F(PPWax_MGB+x>1$4FhAbX|`lHIi zeb)o*Oa?RgRpvW~g-T2!HKMt_;5v=qNc5@0S?*U5fYuBzl%7=4u6E33}l|(ld z2XyuW}HW*sC5448f29aysHGYq%r1Nac6z664Zz(gb*3h_Y}iz9-k zdQbYQ?nC?-_l~FCFVN*DNiZ=U@3U66QH5Mp+HyU$$sCEt6) pp%kDEWkbdAPSsGOZfMX9P?i?$fT+c>q%9qL=^0B`;9H88-Wj@_9@YQ= From 3bc7852f3a242e8045936820f5059953f282e6d2 Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Mon, 11 Jul 2022 14:24:22 +0200 Subject: [PATCH 11/11] Passs kotlin plugin version from gradle.properties --- integration-testing/build.gradle | 2 +- integration-testing/settings.gradle | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/integration-testing/build.gradle b/integration-testing/build.gradle index 191ffcfa3e..78ea298bea 100644 --- a/integration-testing/build.gradle +++ b/integration-testing/build.gradle @@ -3,7 +3,7 @@ */ plugins { - id "org.jetbrains.kotlin.jvm" version "1.7.10" + id "org.jetbrains.kotlin.jvm" version "$kotlin_version" } repositories { diff --git a/integration-testing/settings.gradle b/integration-testing/settings.gradle index 689813e90b..54b47a02b0 100644 --- a/integration-testing/settings.gradle +++ b/integration-testing/settings.gradle @@ -1,12 +1,4 @@ pluginManagement { - resolutionStrategy { - eachPlugin { - if (requested.id.id == "org.jetbrains.kotlin.multiplatform") { - useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - } - } - } - repositories { mavenCentral() maven { url "https://plugins.gradle.org/m2/" }