Skip to content

Commit

Permalink
set up jvm toolchain to specify Java version
Browse files Browse the repository at this point in the history
  • Loading branch information
celcius112 committed Sep 2, 2024
1 parent 15cc2f6 commit ab5a546
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ JCV-DB provides assertions to validate database content against a json file. The
## Prerequisites

If you want to test this project locally we must have the following software install:
- Java 11
- Java 11 (if launching without using Gradle)
- Docker
- Docker compose

Expand Down
11 changes: 4 additions & 7 deletions jcv-db-assertj-db/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.jvm)
Expand Down Expand Up @@ -30,13 +29,11 @@ java {
withSourcesJar()
}

tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
kotlin {
jvmToolchain(11)
}

tasks {
withType<Test> {
useJUnitPlatform()
jvmArgs("-Duser.language=en")
Expand Down
11 changes: 4 additions & 7 deletions jcv-db-cassandra/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.jvm)
Expand Down Expand Up @@ -30,13 +29,11 @@ java {
withSourcesJar()
}

tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
kotlin {
jvmToolchain(11)
}

tasks {
withType<Test> {
useJUnitPlatform()
jvmArgs("-Duser.language=en")
Expand Down
11 changes: 4 additions & 7 deletions jcv-db-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.jvm)
Expand Down Expand Up @@ -30,13 +29,11 @@ java {
withSourcesJar()
}

tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
kotlin {
jvmToolchain(11)
}

tasks {
withType<Test> {
useJUnitPlatform()
jvmArgs("-Duser.language=en")
Expand Down
12 changes: 5 additions & 7 deletions jcv-db-jdbc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.jvm)
Expand All @@ -26,17 +25,16 @@ val javadocJar by tasks.registering(Jar::class) {
from(layout.buildDirectory.file("dokka"))
}


java {
withSourcesJar()
}

tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
kotlin {
jvmToolchain(11)
}

tasks {
withType<Test> {
useJUnitPlatform()
jvmArgs("-Duser.language=en")
Expand Down
10 changes: 4 additions & 6 deletions jcv-db-mongo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.jvm)
Expand Down Expand Up @@ -30,12 +29,11 @@ java {
withSourcesJar()
}

kotlin {
jvmToolchain(11)
}

tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}

withType<Test> {
useJUnitPlatform()
Expand Down

0 comments on commit ab5a546

Please sign in to comment.