Skip to content

Commit

Permalink
build(gradle): Configure Java 17 for all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
CLOVIS-AI committed Jun 17, 2023
1 parent 52e5876 commit c225528
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 40 deletions.
6 changes: 5 additions & 1 deletion backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ application {
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=true")
}

tasks.named<Test>("test") {
kotlin {
jvmToolchain(17)
}

tasks.test {
useJUnitPlatform()
}
13 changes: 8 additions & 5 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ plugins {
}

kotlin {
jvm()
jvm {
jvmToolchain(17)
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js(IR) {
browser {
testTask {
Expand Down Expand Up @@ -47,7 +54,3 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
}
}
}

tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}
13 changes: 8 additions & 5 deletions fake/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ plugins {
}

kotlin {
jvm()
jvm {
jvmToolchain(17)
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js(IR) {
browser {
testTask {
Expand Down Expand Up @@ -38,7 +45,3 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
includes.from("${project.projectDir}/README.md")
}
}

tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}
6 changes: 5 additions & 1 deletion mongo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
}
}

tasks.named<Test>("test") {
kotlin {
jvmToolchain(17)
}

tasks.test {
useJUnitPlatform()
}
13 changes: 8 additions & 5 deletions remote-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ plugins {
}

kotlin {
jvm()
jvm {
jvmToolchain(17)
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js(IR) {
browser {
testTask {
Expand Down Expand Up @@ -49,7 +56,3 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
}
}
}

tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}
13 changes: 8 additions & 5 deletions remote-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ plugins {
}

kotlin {
jvm()
jvm {
jvmToolchain(17)
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js(IR) {
browser {
testTask {
Expand Down Expand Up @@ -50,7 +57,3 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
}
}
}

tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}
4 changes: 4 additions & 0 deletions remote-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
}
}

kotlin {
jvmToolchain(17)
}

tasks.named<Test>("test") {
useJUnitPlatform()
}
22 changes: 9 additions & 13 deletions test-structure/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ plugins {
}

kotlin {
jvm()
jvm {
jvmToolchain(17)
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js(IR) {
browser {
testTask {
Expand All @@ -24,8 +31,7 @@ kotlin {

val commonMain by getting {
dependencies {
api(Kotlin.test.common)
api(Kotlin.test.annotationsCommon)
api(kotlin("test"))

api("opensavvy.pedestal:state:_")
api("opensavvy.pedestal:state-arrow:_")
Expand All @@ -45,15 +51,5 @@ kotlin {
api(Kotlin.test.junit5)
}
}

val jsMain by getting {
dependencies {
api(Kotlin.test.js)
}
}
}
}

tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}
13 changes: 8 additions & 5 deletions test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ plugins {
}

kotlin {
jvm()
jvm {
jvmToolchain(17)
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js(IR) {
browser {
testTask {
Expand Down Expand Up @@ -37,7 +44,3 @@ kotlin {
}
}
}

tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}

0 comments on commit c225528

Please sign in to comment.