Skip to content

Commit 0cb4d2e

Browse files
authored
Set jvmTarget to 1.8 and Kotlin API target to 1.3 (#920)
1 parent 7f04164 commit 0cb4d2e

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
2+
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
13
import java.nio.file.Files
24
import java.nio.file.Paths
35

@@ -29,6 +31,22 @@ allprojects {
2931
releaseMode = true
3032
}
3133
project.extra["releaseMode"] = releaseMode
34+
35+
afterEvaluate {
36+
tasks.withType<KotlinCompile<*>> {
37+
if (this is KotlinJvmCompile) {
38+
kotlinOptions {
39+
apiVersion = "1.3"
40+
jvmTarget = "1.8"
41+
}
42+
} else {
43+
kotlinOptions {
44+
// KN requires 1.4
45+
apiVersion = "1.4"
46+
}
47+
}
48+
}
49+
}
3250
}
3351

3452
listOf("check", "build", "clean").forEach { taskName ->

integration-test/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ kotlin {
2222
val commonTest by getting {
2323
dependencies {
2424
implementation("org.spekframework.spek2:spek-dsl")
25-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-1.4.0-rc")
25+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")
2626
implementation("org.spekframework.spek2:spek-runtime")
2727
implementation(kotlin("test"))
2828
}
@@ -32,7 +32,7 @@ kotlin {
3232
compilations["test"].defaultSourceSet {
3333
dependencies {
3434
runtimeOnly(kotlin("reflect"))
35-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.8-1.4.0-rc")
35+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.9")
3636
implementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0")
3737
implementation("org.mockito:mockito-core:2.23.4")
3838
runtimeOnly("org.spekframework.spek2:spek-runner-junit5")

0 commit comments

Comments
 (0)