I've tried creating an intellij plugin to add a custom kotlin script support via the SciptDefinitionsProvider endpoint. I managed (after some extended period of time) to get it working, that ide recognizes the plugin, associates my kts script extension with it and even the intellisense works great, when I write a script with this extension, it shows no errors, shows context-aware hints, like showing packages of the custom classes I use, showing method parameter names and I can even use the decompiler to inspect their code. Unfortunately, when I try to run the script, I get this error. I have no idea how to debug it. I tried making changes in the dependency list and classpath and nothing helped. Can anyone please help suggesting what may be the cause or how to solve it?
exception: java.lang.NoSuchMethodError: 'java.lang.Object org.jetbrains.kotlin.config.CommonConfigurationKeysKt.getScriptingHostConfiguration(org.jetbrains.kotlin.config.CompilerConfiguration)'
at org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingK2CompilerPluginRegistrar$Companion.registerComponents(pluginRegisrar.kt:98)
at org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingK2CompilerPluginRegistrar.registerExtensions(pluginRegisrar.kt:108)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli_base(KotlinCoreEnvironment.kt:807)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.registerExtensionsFromPlugins(KotlinCoreEnvironment.kt:197)
at org.jetbrains.kotlin.cli.pipeline.jvm.JvmScriptPipelinePhase.executePhase$lambda$0(JvmScriptPipelineStep.kt:42)
at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:100)
at org.jetbrains.kotlin.cli.pipeline.jvm.JvmScriptPipelinePhase.executePhase$lambda$1(JvmScriptPipelineStep.kt:36)