Well, with `.kts` you cannot use the `.main.kts` s...
# scripting
v
Well, with
.kts
you cannot use the
.main.kts
specific things like
@file:DependsOn
and so on.
e
Aha, oke, I thought it was possible
Maybe IDE was slow to react on it
m
.kts
requires 3rd party tools like kscript .
*.main.kts
will get you first party support in both the kotlin CLI and IntelliJ
Not sure what IntelliJ does with
*.main.kts
but this feels more future proof
e
Thanks! It was not my experience but I have to validate it :)
m
Things might be in flux (like IntelliJ trying to add stuff to the classpath for regular
.kts
files) but at the end of the day,
.kts
is not enough to distinguish between something like
foo.gradle.kts
and just
foo.kts
main.kts
is explicit that it's to be run by
kotlin
and not something else
e
Aha! Could be. I found IDE is slow in response sometimes and I am fast to make conclusions :)
1