Skip to content

Commit 98520f7

Browse files
committed
Upgrade to Kotlin 1.4
1 parent ea871f8 commit 98520f7

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

Diff for: build.gradle.kts

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import org.jetbrains.dokka.gradle.DokkaTask
21
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
32

43
plugins {
5-
kotlin("jvm") version "1.3.72"
4+
kotlin("jvm") version "1.4.0"
65
`java-library`
76
`maven-publish`
87

9-
id("org.jmailen.kotlinter") version "2.4.1"
10-
id("org.jetbrains.dokka") version "0.10.1"
8+
id("org.jmailen.kotlinter") version "3.0.2"
9+
id("org.jetbrains.dokka") version "1.4.0"
1110
}
1211

1312
group = "com.lapanthere"
@@ -17,13 +16,13 @@ repositories {
1716
}
1817

1918
dependencies {
20-
val kotlinVersion = "1.3.72"
19+
val kotlinVersion = "1.4.0"
2120
implementation(kotlin("stdlib-jdk8", kotlinVersion))
2221

2322
implementation(kotlin("test", kotlinVersion))
2423
implementation(kotlin("test-junit", kotlinVersion))
2524

26-
val coroutineVersion = "1.3.8"
25+
val coroutineVersion = "1.3.9"
2726
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion")
2827
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutineVersion")
2928
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutineVersion")
@@ -40,16 +39,12 @@ tasks.register<Jar>("sourcesJar") {
4039
from(sourceSets.main.get().allSource)
4140
}
4241

43-
tasks.named<KotlinCompile>("compileKotlin") {
44-
kotlinOptions.freeCompilerArgs = listOf("-Xexplicit-api=strict")
45-
}
46-
4742
tasks.withType<KotlinCompile> {
4843
kotlinOptions.jvmTarget = "1.8"
4944
}
5045

51-
tasks.withType<DokkaTask> {
52-
outputFormat = "gfm"
46+
kotlin {
47+
explicitApi()
5348
}
5449

5550
kotlinter {

Diff for: src/main/kotlin/com/lapanthere/signals/S3InputStream.kt

+12-10
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,21 @@ public class S3InputStream(
5656
).await().asInputStream()
5757
}
5858
}.toMutableList()
59-
private val buffer = SequenceInputStream(object : Enumeration<InputStream> {
60-
private val iterator = streams.iterator()
59+
private val buffer = SequenceInputStream(
60+
object : Enumeration<InputStream> {
61+
private val iterator = streams.iterator()
6162

62-
override fun hasMoreElements(): Boolean {
63-
// Starts downloading the next chunks ahead.
64-
streams.take(parallelism).forEach { it.start() }
65-
return iterator.hasNext()
66-
}
63+
override fun hasMoreElements(): Boolean {
64+
// Starts downloading the next chunks ahead.
65+
streams.take(parallelism).forEach { it.start() }
66+
return iterator.hasNext()
67+
}
6768

68-
override fun nextElement(): InputStream = runBlocking {
69-
iterator.use { it.await() }
69+
override fun nextElement(): InputStream = runBlocking {
70+
iterator.use { it.await() }
71+
}
7072
}
71-
})
73+
)
7274

7375
override fun read(): Int {
7476
return buffer.read()

0 commit comments

Comments
 (0)