Skip to content

Commit

Permalink
use jdk21 in groovy and kotlin plugin runners
Browse files Browse the repository at this point in the history
  • Loading branch information
dkandalov committed Aug 29, 2024
1 parent bc1cdc8 commit 7d2a23f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class GroovyPluginRunner(
// Assume that GroovyScriptEngine is thread-safe
// (according to this http://groovy.329449.n5.nabble.com/Is-the-GroovyScriptEngine-thread-safe-td331407.html)
val scriptEngine = GroovyScriptEngine(pluginFolderUrl, classLoader)
scriptEngine.config.targetBytecode = "17"
scriptEngine.config.targetBytecode = "21"
try {
scriptEngine.loadScriptByName(mainScript.toUrlString())
} catch (e: Exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import liveplugin.implementation.common.toFilePath
import java.io.File
import kotlin.script.experimental.annotations.KotlinScript
import kotlin.script.experimental.api.*
import kotlin.script.experimental.api.ScriptAcceptedLocation.Everywhere
import kotlin.script.experimental.host.FileScriptSource
import kotlin.script.experimental.intellij.ScriptDefinitionsProvider
import kotlin.script.experimental.jvm.JvmDependency
Expand Down Expand Up @@ -36,8 +37,8 @@ open class LivePluginScriptConfig(
beforeCompiling { context -> ResultWithDiagnostics.Success(createConfig(context), reports = emptyList()) }
}
ide {
compilerOptions("-jvm-target", "17")
acceptedLocations(ScriptAcceptedLocation.Everywhere)
compilerOptions("-jvm-target", "21")
acceptedLocations(Everywhere)
dependenciesSources(JvmDependency(livePluginLibAndSrcFiles()))
// dependenciesSources(JvmDependency(listOf( // This doesn't work 😠
// File(".../Application Support/JetBrains/IntelliJIdea2021.1/plugins/live-plugins/multiple-src-files/foo.kt"),
Expand Down

0 comments on commit 7d2a23f

Please sign in to comment.