Le 2017-04-10 13:57, Niclas Hedhman a écrit :
Paul,
I looked at exactly the same page as you, but I didn't trust the
documentation and went to
https://github.com/JetBrains/kotlin/tree/master/libraries/examples/kotlin-jsr223-local-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223
where it ultimately points to, and there it is a .kt file. Maybe add
multiple extensions...
This .kt file is a test that demonstrate usage of Kotlin Scripting.
.kts is the only extension for which the scripting engine is registered
and the official way to denotate Kotlin Scripts from regular Kotlin
files. IDEs make that difference too.
See
https://github.com/JetBrains/kotlin/blob/master/libraries/examples/kotlin-jsr223-local-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt#L36