KotlinScriptExecutor.ktScriptExecutor for Kotlin scripts. Compiles and evaluates Kotlin source using the kotlin.script.experimental API. Handles fat JAR classpath resolution via JarExtractor, variable binding via KotlinScriptContext, and script execution with 300-second timeout and proper error diagnostics.Configures Kotlin scripting with:
URLClassLoader with JarExtractor.classpathUrls and updateClasspath(JarExtractor.classpathFiles). Otherwise uses dependenciesFromCurrentContext(wholeClasspath=true)."context" as type KotlinScriptContext, enabling context.getProperty("name") in scripts.-nowarn to suppress noise.Uses Executors.newSingleThreadExecutor() with a 300-second timeout via Future.get(300, SECONDS). On timeout, cancels the future, logs the error, and sets scriptExecutionResult.exception. The executor is always shut down in finally.
Populates a KotlinScriptContext with all variables and parameters, which the KotlinScriptUtils.appendBlockAfterImports then generates Kotlin property declarations for.
Adds Kotlin-specific imports beyond the base STANDARD_IMPORTS: localization functions (translate, translateMsg), number formatting extensions (format, formatCurrency, formatBytes), and PfCaches.initialize.
868d6abb7 2025 -> 2026 801bf7c63 Scripting: ScriptLogger is added to ThreadLocal. 63081666f Source file headers: 2024-> 2025. aeff942b5 Script execution improved (logging for end user). 22ccc4877 WIP: Scripting 36c9acc50 It was a hard, hard work, but Kotlin scripts are running, yeah! 921638f43 WIP de4d8d2af Combat with KotlinExecutor in SpringBoot's fat jar. 302470ef9 Combat with KotlinExecutor in SpringBoot's fat jar. 7617cf5da Combat with KotlinExecutor in SpringBoot's fat jar. 31545575d Combat with KotlinExecutor in SpringBoot's fat jar. 4c8365b88 Kotlin scripting refactored (All tests OK) b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 47aec0fc2 WIP: sudo scripting a10660bc8 WIP: scripting. 52ef31ca5 WIP: scripting 69121a1f8 WIP: scripting 7059cacd4 WIP: Scripting: support of parameter names including white spaces. de0d98425 WIP: scripting: fix for null script values. d37760c3e Scripting refactored. 0bd431bd9 WIP scripting... 97e4bd526 Scripting: pantha rein. ACE editor added. 5f7ef41b8 Copyright 2021 -> 2022 ceb63e8a1 Source code header: (C) 2001-2021. d60de80b6 MyKotlinScriptEngineFactory works now with fat spring boot jar. 6fd010dd6 Kotlin scripting works now with ugly work-around for Spring boot fat jar. 52d9c1d88 WIP: Kotlin scripts... c5aa8210b WIP: Support of Kotlin scripts added in addition to Groovy...