Skip to content

Commit

Permalink
Issue #142: resolve jdk version error
Browse files Browse the repository at this point in the history
  • Loading branch information
cfig committed Apr 4, 2024
1 parent 4bfdd40 commit 95ed740
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lazybox/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.3/userguide/building_java_projects.html in the Gradle documentation.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.9.22"
application
Expand All @@ -29,10 +31,16 @@ dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

tasks.withType<KotlinCompile>().all {
kotlinOptions {
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlin.ExperimentalUnsignedTypes"
jvmTarget = "11"
}
}

Expand Down

0 comments on commit 95ed740

Please sign in to comment.