Skip to content

Commit

Permalink
Sette java versjon på både java og kotlin via toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
gtcno committed Oct 26, 2023
1 parent c8b3826 commit 267dfe7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ application {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
Expand Down Expand Up @@ -128,19 +129,20 @@ spotless {
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.freeCompilerArgs = listOf("-Xuse-experimental=io.ktor.locations.KtorExperimentalLocationsAPI")
kotlinOptions.jvmTarget = "1.8"
}

tasks.withType<Test> {
useJUnitPlatform()
testLogging {
showExceptions = true
showStackTraces = true
showStandardStreams = true
exceptionFormat = TestExceptionFormat.FULL
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED, TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR)
events = setOf(
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.FAILED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR
)
}
}

Expand Down

0 comments on commit 267dfe7

Please sign in to comment.