From 6f727aff88333cad19efbdfd04c391ae4b982151 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Tue, 29 Oct 2024 23:42:37 +0100 Subject: [PATCH] fix beanshell compile with jdk11 --- beanshell/build.gradle.kts | 18 +++++++++++++----- compiler/compiler.iml | 1 - 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/beanshell/build.gradle.kts b/beanshell/build.gradle.kts index d9526d7cd..874973148 100644 --- a/beanshell/build.gradle.kts +++ b/beanshell/build.gradle.kts @@ -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()) - } -} \ No newline at end of file + compilerOptions.jvmTarget = JvmTarget.JVM_11 +// jvmToolchain { +// languageVersion = JavaLanguageVersion.of(javaVersion.toInt()) +// } +} + diff --git a/compiler/compiler.iml b/compiler/compiler.iml index d43f3eaf9..8bbb96375 100644 --- a/compiler/compiler.iml +++ b/compiler/compiler.iml @@ -25,6 +25,5 @@ - \ No newline at end of file