Skip to content

Commit

Permalink
Fix Kotlin compiler versions mismatch warning
Browse files Browse the repository at this point in the history
Add java toolchain to use Java 11.

Signed-off-by: Saeed Rezaee <[email protected]>
  • Loading branch information
SaeedRe authored and danielesergio committed Apr 26, 2023
1 parent 380891c commit cd041b6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ allprojects {
}
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
vendor = JvmVendorSpec.ADOPTOPENJDK
}
}
}

project(':ddi-consumer') {
Expand Down Expand Up @@ -116,7 +123,7 @@ project(':virtual-device'){

mainClassName = 'org.eclipse.hara.ddiclient.virtualdevice.MainKt'

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions.freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
}
}
Expand Down Expand Up @@ -237,7 +244,7 @@ test.finalizedBy stopHawkbitServer
group 'org.eclipse.hara.hara-ddiclient'
version app_version

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlin.Experimental"]
}

Expand Down

0 comments on commit cd041b6

Please sign in to comment.