Setup KorGE IntelliJ Plugin

The simplest way to start with KorGE is by using its IntelliJ plugin. The plugin works on Android Studio and IntelliJ IDEA Community and Ultimate.

Table of contents:

Video-tutorial

Intalling KorGE IntelliJ Plugin

First we open IntelliJ. If we don’t have it installed, check the Toolbox section. After opening IntelliJ we should see a window similar to this one:

intellij1

We have to click on Configure -> Plugins:

intellij2

Then in the Marketplace tab, we have to search for korge, and then press the Install button.

intellij3

After downloading, the Install button will be changed with Restart IDE. We press that button.

intellij3b

After installed, we have to be sure that the Korge plugin is enabled in the plugins Installed tab.

intellij4

Creating a new project

First, we open IntelliJ and press the Create New Project button.

project1

Then we select Korge from the list of templates of the left, and without changing anything else, we press the Next button.

project2

Optionally, we can choose the GroupId, ArtifactId and Version for the project. Then press Next.

project3

Now we choose the Project name and press the Finish button.

project4

Our entrypoint is at src/commonMain/kotlin/main.kt. Unfortunately at this point we can’t use the play gutter icon. To execute our game, we have to go to the Gradle tab, then Tasks -> korge-run -> runJvm.

project5

Right click on the task and Run 'project [runJvm]':

project6

Now we have our project up and running!

project7

Installing JetBrains Toolbox

The Toolbox application allows us to install several JetBrain-based IDEs.

You can download it here: https://www.jetbrains.com/toolbox-app/

toolbox

Suggested IntelliJ configuration

I suggest you to configure IntelliJ IDEA with:

  • Editor → Code Style → Kotlin → Imports → Use imports with ‘*’
  • Build, Execution, Deployment → Build Tools → Gradle → Runner → Delegate IDE build/run actions to gradle and Run tests using Gradle test runner
  • Editor → General → Code Completion → Match Case - NO, Show the parameter info popup in 0 ms