fix beanshell compile with jdk11

This commit is contained in:
Irmen de Jong 2024-10-29 23:42:37 +01:00
parent 518e5a30c2
commit 6f727aff88
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm")
id("application")
@ -5,6 +7,7 @@ plugins {
val serverMainClassName = "prog8lsp.MainKt"
val applicationName = "prog8-beanshell"
val javaVersion: String by project
application {
mainClass.set(serverMainClassName)
@ -74,10 +77,15 @@ tasks.build {
finalizedBy("installDist")
}
val javaVersion: String by project
java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}
kotlin {
jvmToolchain {
languageVersion = JavaLanguageVersion.of(javaVersion.toInt())
}
compilerOptions.jvmTarget = JvmTarget.JVM_11
// jvmToolchain {
// languageVersion = JavaLanguageVersion.of(javaVersion.toInt())
// }
}

View File

@ -25,6 +25,5 @@
<orderEntry type="module" module-name="virtualmachine" />
<orderEntry type="module" module-name="intermediate" scope="TEST" />
<orderEntry type="library" name="antlr.antlr4" level="project" />
<orderEntry type="module" module-name="beanshell" />
</component>
</module>