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

View File

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