I can't get Kotlin to run on a fresh project with IDEA. When I mark /src as Sources Root, I get the message "Kotlin not configured" above the file. No idea whats going wrong
m
Mike
11/17/2018, 6:08 PM
If you’re using Gradle to build, then in IDEA, create a new project from existing sources, and point to the directory containing the build.gradle file.
IntelliJ will ‘read’ the Gradle file, and setup your project for you. No need to manually configure the project, or source sets, or anything else
Mike
11/17/2018, 6:10 PM
Also, the
src
folder doesn’t get marked as a source root. This assumes you have the standard Maven/Gradle folder structure, where your kotlin code lives in
src/main/kotlin
. You’d mark the kotlin folder as a source root.
p
Pat
11/17/2018, 6:11 PM
that worked. Thanks
m
Mike
11/17/2018, 6:12 PM
and if you change your gradle file, IntelliJ will update automatically (if you turned on auto-import), or prompt you to refresh the project otherwise