louiscad
11/30/2018, 4:59 PM.gradle.kts
), but the syntax highlighting is not there apart from keywords and strings as I said.gildor
12/02/2018, 1:37 PMlouiscad
12/02/2018, 1:55 PMgradle.kts
files but just .kts
file. What is not working is syntax highlighting besides reserved keywords. To get it, I have to prefix .kts
with .gradle
, which is a workaround. I think I'll stick to this while they improve scripting support in next Kotlin versions.gildor
12/02/2018, 2:21 PMlouiscad
12/02/2018, 2:22 PMAlexey Belkov [JB]
12/03/2018, 9:28 AM.kts
script with highlighting, navigation, etc. you should add a compile "org.jetbrains.kotlinkotlin script runtime1.3.10" dependency to your build script and place the script file under a source root, ex. src/main/java/script.kts
. Out-of-module scripts are not currently supported.
See also https://youtrack.jetbrains.com/issue/KT-27853#focus=streamItem-27-3159647-0-0gildor
12/03/2018, 10:53 AMilya.chernikov
12/04/2018, 10:59 AMgildor
12/04/2018, 1:48 PMkotlinc -script some.kts
doesn't require explicitly specify stdlib jar and just works, I believe this should be also default behavior of Kotlin Idea plugin, just because it's default behavior of kotlinc and it's not practical to use Kotlin without stdlib. Probably Idea just should implicitly use bundled stdlib for any kts without script definition or opened outside of any project