WHY is it so hard to get a kotlin file working in ...
# intellij
v
WHY is it so hard to get a kotlin file working in a java project? THE instructions just state "just add the file and well handle the rest" But in reality all that is handled is nothing and instead of getting a working kotlin file i get useless crap like "There arent any configurators available" LIKE cmon what the hell is going on? I have googled, tried invalidating the caches, no dice, adding the kotlin gradle to the classpath, no dice So much for interop right?
c
You haven’t indicated what instructions you’re following, how your project configuration looks like or what errors you’ve encountered. Typically, for a Gradle build, you turn it into a Kotlin project (apply Kotlin plugin) which implicitly supports Java source alongside; IntelliJ pulls that configuration in.
plus1 2
When I attempt to configure the project via the tool window, it just says "There arent any configurators available"
j
As Chris said. This depends on how the project is being built. Most real world projects are using a tool other than what is built into intellij, ie maven or gradle. If that's the case for you than you're following the wrong instructions
v
Yeah I was using gradle. Turns out you have to apply the plugin at the project level essentially turning it into a Kotlin project. This is different from the project style that something visual studio uses. I was trying to do this on modules and that is #notright
Thanks Chris, your answer helped a lot
👍 1