IntelliJ, LibGDX, Kotlin and Android
As I stated in the "introduce yourself" thread, I've chosen to write my game using Kotlin rather than Java. I've been looking for an opportunity to learn it for a while, and there are few better ways of learning a language than actually building a project with it.
The first step in any project is setting up the build environment. There is plenty of useful guidance on doing this, including an article on setting up LibGDX to work with Kotlin, but as I hit a few snags along the way I've shared my steps here in case anyone else is thinking of using Kotlin and is struggling to get it to work with an Android project.
Part 1 - Building and running desktop and Android configurations
Run the LibGDX project setup and create sub-projects for both desktop and Android.
Open IntelliJ and load build.gradle.
Fix the project so that the desktop run configuration will work, by adding the Java-Gradle facet to all sub-projects except Android, i.e, to the "core" and "desktop" sub-projects.
At this point, it should be possible to build and run the desktop and Android configurations without errors. If the desktop configuration doesn't run, try closing and re-opening the project.
But that doesn't get us Kotlin. That requires jumping through a few more hoops.
Part 2 follows in the next post.