Hello, guys. I'm trying to make something like plu...
# scripting
n
Hello, guys. I'm trying to make something like plugins in my app. But, I got a problem with setting up context for scripts. My configuration is here - https://pastebin.com/HkaEgx2z. My script is here - https://pastebin.com/XzUx6iaB. They all in one module and pkg, but the script does not see the new context. I'll be glad If someone help! Thanks in advance!
i
He @Neon Unfortunately the first link is not valid anymore, so I cannot check your configuration. But from the second link I can tell that your script definition is not loaded to the IntelliJ. There are two ways you can provide your definition to the idea. The simple one - create a jar with definition and discovery file in the META-INF, see the example here https://github.com/Kotlin/kotlin-script-examples/tree/master/jvm/simple-main-kts And then add it to the dependencies of your module. After that the sccripts of this type will be recognized in your module's source roots. Another way is to create an IntelliJ plugin, which is not an easy thing to do for most.