Skip to content

Commit 150f185

Browse files
authored
Update Kotlin to 1.7.20 (#3478)
* Update Kotlin to 1.7.20 * Add workaround for compiler bug * Update atomicfu and Dokka
1 parent 27396e7 commit 150f185

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
55
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
66
[![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)
7-
[![Kotlin](https://img.shields.io/badge/kotlin-1.7.10-blue.svg?logo=kotlin)](http://kotlinlang.org)
7+
[![Kotlin](https://img.shields.io/badge/kotlin-1.7.20-blue.svg?logo=kotlin)](http://kotlinlang.org)
88
[![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/coroutines/)
99

1010
Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
11-
This is a companion version for the Kotlin `1.7.10` release.
11+
This is a companion version for the Kotlin `1.7.20` release.
1212

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

9393
```xml
9494
<properties>
95-
<kotlin.version>1.7.10</kotlin.version>
95+
<kotlin.version>1.7.20</kotlin.version>
9696
</properties>
9797
```
9898

@@ -111,10 +111,10 @@ And make sure that you use the latest Kotlin version:
111111
```kotlin
112112
plugins {
113113
// For build.gradle.kts (Kotlin DSL)
114-
kotlin("jvm") version "1.7.10"
114+
kotlin("jvm") version "1.7.20"
115115

116116
// For build.gradle (Groovy DSL)
117-
id "org.jetbrains.kotlin.jvm" version "1.7.10"
117+
id "org.jetbrains.kotlin.jvm" version "1.7.20"
118118
}
119119
```
120120

gradle.properties

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
# Kotlin
66
version=1.6.4-SNAPSHOT
77
group=org.jetbrains.kotlinx
8-
kotlin_version=1.7.10
8+
kotlin_version=1.7.20
99

1010
# Dependencies
1111
junit_version=4.12
1212
junit5_version=5.7.0
13-
atomicfu_version=0.18.2
13+
atomicfu_version=0.18.4
1414
knit_version=0.4.0
1515
html_version=0.7.2
1616
lincheck_version=2.14.1
17-
dokka_version=1.6.21
17+
dokka_version=1.7.20
1818
byte_buddy_version=1.10.9
1919
reactor_version=3.4.1
2020
reactive_streams_version=1.0.3

gradle/compile-native-multiplatform.gradle

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ project.ext.nativeMainSets = []
66
project.ext.nativeTestSets = []
77

88
kotlin {
9-
targets.metaClass.addTarget = { preset ->
10-
def target = delegate.fromPreset(preset, preset.name)
11-
project.ext.nativeMainSets.add(target.compilations['main'].kotlinSourceSets.first())
12-
project.ext.nativeTestSets.add(target.compilations['test'].kotlinSourceSets.first())
9+
targets {
10+
delegate.metaClass.addTarget = { preset ->
11+
def target = delegate.fromPreset(preset, preset.name)
12+
project.ext.nativeMainSets.add(target.compilations['main'].kotlinSourceSets.first())
13+
project.ext.nativeTestSets.add(target.compilations['test'].kotlinSourceSets.first())
14+
}
1315
}
1416

1517
targets {

integration-testing/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
kotlin_version=1.7.10
1+
kotlin_version=1.7.20
22
coroutines_version=1.6.4-SNAPSHOT
33
asm_version=9.3
44

kotlinx-coroutines-core/jvm/src/internal/SegmentBasedQueue.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ internal class SegmentBasedQueue<T> {
3535
while (true) {
3636
val curTail = this.tail.value
3737
val enqIdx = this.enqIdx.getAndIncrement()
38+
@Suppress("INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION") // KT-54411
3839
val segmentOrClosed = this.tail.findSegmentAndMoveForward(id = enqIdx, startFrom = curTail, createNewSegment = ::createSegment)
3940
if (segmentOrClosed.isClosed) return null
4041
val s = segmentOrClosed.segment
@@ -48,6 +49,7 @@ internal class SegmentBasedQueue<T> {
4849
if (this.deqIdx.value >= this.enqIdx.value) return null
4950
val curHead = this.head.value
5051
val deqIdx = this.deqIdx.getAndIncrement()
52+
@Suppress("INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION") // KT-54411
5153
val segmentOrClosed = this.head.findSegmentAndMoveForward(id = deqIdx, startFrom = curHead, createNewSegment = ::createSegment)
5254
if (segmentOrClosed.isClosed) return null
5355
val s = segmentOrClosed.segment
@@ -122,4 +124,4 @@ internal class OneElementSegment<T>(id: Long, prev: OneElementSegment<T>?, point
122124
}
123125
}
124126

125-
private val BROKEN = Symbol("BROKEN")
127+
private val BROKEN = Symbol("BROKEN")

0 commit comments

Comments
 (0)