SrSouza
02/15/2020, 3:56 PMilya.chernikov
02/19/2020, 7:08 AMDependsOnMaven and MavenRepository annotations are used mainly in the kotlin jupyter kernel.
In the primary Kotlin repo, the annotations DependsOn and Repository are used instead. The "standard" definition that implements them is kotlin-main-kts - this module is distributed with the Kotlin command-line compiler as well as with the IntelliJ plugin, and can also be downloaded from maven central.
If it doesn't answer your question, please tell.SrSouza
02/22/2020, 5:10 PMilya.chernikov
02/24/2020, 10:20 AMkotlin-main-kts. There is a distilled version of it - https://github.com/Kotlin/kotlin-script-examples/blob/master/jvm/simple-main-kts/SimpleMainKts.md (this is not-yet-official Kotlin scripting examples repo).
There are some other - to my mind - harder - solutions too, so if this one dosen't suit you (or I misuderstood your aim again), please tell.SrSouza
02/25/2020, 5:07 PM*.main.kts the IntelliJ supports it automatically, but, in the case of custom script definition, such as smain.kts in the example, how can I make IntelliJ supports it (highlighted, navigation and implicit imports (the annotations is implicit imported if an understanding correctly) ) ? I need to add a dependency in the Gradle project that was META-INF/kotlin/script/templates and the IntelliJ already support that?
You guys are thinking in add a configuration to Kotlin IntelliJ plugin to provide a list of script definition jars that we can use to make IntelliJ support automatically the script, such as with a URL to a jar file or a maven dependency with the META-INF/kotlin/script/templates? In scratch kts files for example we can choose the module classpath, could be nice you choose the script definition that we want to use.ilya.chernikov
02/29/2020, 9:39 AMPreferences -> Build, Execution, Deployment -> Compiler -> Kotlin Compiler -> Kotlin Scripting, that allow you to add specific script support without writing an IntelliJ plugin.
There is also Preferences -> Languages & Frameworks -> Kotlin -> Kotlin Scripting, where you can see which script support is currently loaded.
But scratch files are not yet connected to the custom script processing, hopefully we'll support this someday too.