How to work with kotlin script in IDE. I have pyth...
# intellij
e
How to work with kotlin script in IDE. I have python project and I want to write a quick kotlin script. I created kts file. But no autocompletion or import works.
m
Name it foo.main.kts
It needs to end with
.main.kts
e
oh, main!
let me try
That works!
🎉 1
Super
m
Other thing to know is that the resolver doesn't understand Gradle metadata so you need to import JVM artifacts:
Copy code
@file:DependsOn("com.github.ajalt.clikt:clikt-jvm:3.1.0") // not :clikt:3.1.0
Besides that it's pretty cool
😮 1
👀 2
e
That I already found! Thank you so much!
💙 1
m
Sure thing! Happy scripting!
👍 1
K 2