diff --git a/README.md b/README.md index 522c70aa30..719c55e7bb 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ [![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.4.2) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.4.2) -[![Kotlin](https://img.shields.io/badge/kotlin-1.4.0-blue.svg?logo=kotlin)](http://kotlinlang.org) +[![Kotlin](https://img.shields.io/badge/kotlin-1.4.20-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 Kotlin `1.4.0` release. +This is a companion version for Kotlin `1.4.20` release. ```kotlin suspend fun main() = coroutineScope { @@ -94,7 +94,7 @@ And make sure that you use the latest Kotlin version: ```xml - 1.4.0 + 1.4.20 ``` @@ -112,7 +112,7 @@ And make sure that you use the latest Kotlin version: ```groovy buildscript { - ext.kotlin_version = '1.4.0' + ext.kotlin_version = '1.4.20' } ``` @@ -138,7 +138,7 @@ And make sure that you use the latest Kotlin version: ```groovy plugins { - kotlin("jvm") version "1.4.0" + kotlin("jvm") version "1.4.20" } ``` diff --git a/build.gradle b/build.gradle index 938d42e7a1..e4cacbfb07 100644 --- a/build.gradle +++ b/build.gradle @@ -203,6 +203,8 @@ configure(subprojects.findAll { !sourceless.contains(it.name) }) { kotlinOptions.freeCompilerArgs += experimentalAnnotations.collect { "-Xuse-experimental=" + it } kotlinOptions.freeCompilerArgs += "-progressive" kotlinOptions.freeCompilerArgs += "-XXLanguage:+InlineClasses" + // Disable KT-36770 for RxJava2 integration + kotlinOptions.freeCompilerArgs += "-XXLanguage:-ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated" // Remove null assertions to get smaller bytecode on Android kotlinOptions.freeCompilerArgs += ["-Xno-param-assertions", "-Xno-receiver-assertions", "-Xno-call-assertions"] } @@ -335,4 +337,4 @@ if (jvm_ir_enabled) { enabled = enabled && jvm_ir_api_check_enabled } } -} \ No newline at end of file +} diff --git a/gradle.properties b/gradle.properties index cb039062f8..3c9fed6236 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ # Kotlin version=1.4.2-SNAPSHOT group=org.jetbrains.kotlinx -kotlin_version=1.4.0 +kotlin_version=1.4.20 # Dependencies junit_version=4.12 diff --git a/gradle/publish-mpp-root-module-in-platform.gradle b/gradle/publish-mpp-root-module-in-platform.gradle index 8bc0b502db..28068273c9 100644 --- a/gradle/publish-mpp-root-module-in-platform.gradle +++ b/gradle/publish-mpp-root-module-in-platform.gradle @@ -3,37 +3,40 @@ */ -/* - * Publish the platform JAR and POM so that consumers who depend on this module and can't read Gradle module metadata - * can still get the platform artifact and transitive dependencies from the POM. - * - * See the full rationale here https://youtrack.jetbrains.com/issue/KMM-237#focus=streamItem-27-4115233.0-0 - */ -project.ext.publishPlatformArtifactsInRootModule = { platformPublication -> - def platformPomBuilder = null +/** Publish the platform JAR and POM so that consumers who depend on this module and can't read Gradle module + metadata can still get the platform artifact and transitive dependencies from the POM: */ +project.ext.publishPlatformArtifactsInRootModule = { MavenPublication platformPublication -> - platformPublication.pom.withXml { platformPomBuilder = asString() } + XmlProvider platformXml = null - publishing.publications.kotlinMultiplatform { - platformPublication.artifacts.forEach { - artifact(it) - } + platformPublication.pom.withXml { platformXml = it } + publishing.publications.kotlinMultiplatform { pom.withXml { - def pomStringBuilder = asString() - pomStringBuilder.setLength(0) - // The platform POM needs its artifact ID replaced with the artifact ID of the root module: - def platformPomString = platformPomBuilder.toString() - platformPomString.eachLine { line -> - if (!line.contains("