I’ve been using Kotlin at work for several months now and today I tried creating a new personal project on my machine at home.
I did what I wanted to do in around an hour and spent the rest of the evening pulling my hair trying to figure out gradle and how it relates to Kotlin, IDEA and so on.
The main issue I have can be seen below:
The project compiles fine and tests run successfully, however the IDE keeps complaining about missing stuff. I’ve tried adding all sort of dependencies to the gradle build file (including ones from a project that works) but nothing fixed it. I deleted everything in the project (except src), reimported it back and ended up with the same problem.
On a somewhat unrelated subject, while I like Kotlin as a language (it’s easy, obvious and predictable), gradle is exactly the opposite. The gradle DSL is horrible, unintuitive and inconsistent. On top of that, the Kotlin-Gradle DSL from “Using Gradle” page didn’t work:
I’m sure there are some missing things (maybe imports or smth?), but the docs do not cover anything else. Just sayin’