Skip to content

Commit

Permalink
Update Kotlin to 1.7.20 (Kotlin#3478)
Browse files Browse the repository at this point in the history
* Update Kotlin to 1.7.20
* Add workaround for compiler bug
* Update atomicfu and Dokka
  • Loading branch information
qwwdfsad committed Oct 12, 2022
1 parent 27396e7 commit 150f185
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
[![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.4)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.4/pom)
[![Kotlin](https://img.shields.io/badge/kotlin-1.7.10-blue.svg?logo=kotlin)](http:https://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-1.7.20-blue.svg?logo=kotlin)](http:https://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.7.10` release.
This is a companion version for the Kotlin `1.7.20` release.

```kotlin
suspend fun main() = coroutineScope {
Expand Down Expand Up @@ -92,7 +92,7 @@ And make sure that you use the latest Kotlin version:

```xml
<properties>
<kotlin.version>1.7.10</kotlin.version>
<kotlin.version>1.7.20</kotlin.version>
</properties>
```

Expand All @@ -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.7.10"
kotlin("jvm") version "1.7.20"

// For build.gradle (Groovy DSL)
id "org.jetbrains.kotlin.jvm" version "1.7.10"
id "org.jetbrains.kotlin.jvm" version "1.7.20"
}
```

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# Kotlin
version=1.6.4-SNAPSHOT
group=org.jetbrains.kotlinx
kotlin_version=1.7.10
kotlin_version=1.7.20

# Dependencies
junit_version=4.12
junit5_version=5.7.0
atomicfu_version=0.18.2
atomicfu_version=0.18.4
knit_version=0.4.0
html_version=0.7.2
lincheck_version=2.14.1
dokka_version=1.6.21
dokka_version=1.7.20
byte_buddy_version=1.10.9
reactor_version=3.4.1
reactive_streams_version=1.0.3
Expand Down
10 changes: 6 additions & 4 deletions gradle/compile-native-multiplatform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ project.ext.nativeMainSets = []
project.ext.nativeTestSets = []

kotlin {
targets.metaClass.addTarget = { preset ->
def target = delegate.fromPreset(preset, preset.name)
project.ext.nativeMainSets.add(target.compilations['main'].kotlinSourceSets.first())
project.ext.nativeTestSets.add(target.compilations['test'].kotlinSourceSets.first())
targets {
delegate.metaClass.addTarget = { preset ->
def target = delegate.fromPreset(preset, preset.name)
project.ext.nativeMainSets.add(target.compilations['main'].kotlinSourceSets.first())
project.ext.nativeTestSets.add(target.compilations['test'].kotlinSourceSets.first())
}
}

targets {
Expand Down
2 changes: 1 addition & 1 deletion integration-testing/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin_version=1.7.10
kotlin_version=1.7.20
coroutines_version=1.6.4-SNAPSHOT
asm_version=9.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ internal class SegmentBasedQueue<T> {
while (true) {
val curTail = this.tail.value
val enqIdx = this.enqIdx.getAndIncrement()
@Suppress("INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION") // KT-54411
val segmentOrClosed = this.tail.findSegmentAndMoveForward(id = enqIdx, startFrom = curTail, createNewSegment = ::createSegment)
if (segmentOrClosed.isClosed) return null
val s = segmentOrClosed.segment
Expand All @@ -48,6 +49,7 @@ internal class SegmentBasedQueue<T> {
if (this.deqIdx.value >= this.enqIdx.value) return null
val curHead = this.head.value
val deqIdx = this.deqIdx.getAndIncrement()
@Suppress("INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION") // KT-54411
val segmentOrClosed = this.head.findSegmentAndMoveForward(id = deqIdx, startFrom = curHead, createNewSegment = ::createSegment)
if (segmentOrClosed.isClosed) return null
val s = segmentOrClosed.segment
Expand Down Expand Up @@ -122,4 +124,4 @@ internal class OneElementSegment<T>(id: Long, prev: OneElementSegment<T>?, point
}
}

private val BROKEN = Symbol("BROKEN")
private val BROKEN = Symbol("BROKEN")

0 comments on commit 150f185

Please sign in to comment.