How to create or setup kotlin script projects. I c...
# scripting
j
How to create or setup kotlin script projects. I cloned a kotlin script project from github and it worked fine. I created a new one from IDEA but ide cannot correctly resolve kts file and the annotations in it
i
Hello! Where do you place your script file?
j
root dir or under a specific package
I found that if I create kts file by “new” -> “File” -> name it as xxx.main.kts, then ide imports correct dependencies we need
otherwise “kotlin-main-kts” won’t be imported
i
Can you attach your project?
j
just an empty project created from IDEA
i
Am I right that everything works with
***.main.kts
? What build system do you use?
j
Yep, except @file:Import(“xx.kts”)
Import other kts file will cause syntax highlight broken
i
Can you attach a sample project?