Learning Kotlin

The Utilihive SDK is designed to be used in a Kotlin project, but you do not need to be a Kotlin expert to start developing flows. Flows themselves are written in a Lowcode DSL, after all. Most of the Kotlin logic you implement will actually be part of your unit and functional tests. Of course, the more Kotlin you know, the better! If you are new to the Kotlin programming language, there are a few courses you can take directly in IntelliJ.

JetBrains Academy Plugin

To access the Kotlin courses, you will need to install the JetBrains Academy plugin for IntelliJ. The following steps outline how to do this from the IntelliJ editor:

  1. Select File > Settings on Windows and Linux or IntelliJ IDEA > Settings on macOS.

  2. In the Settings window, select Plugins.

  3. In the Marketplace tab, search for "jetbrains academy".

  4. Select the Install button to install the JetBrains Academy plugin.

The process will look like the following image:

The Plugins tab in the Settings window displays an option to install the JetBrains Academy plugin.

After JetBrains Academy is set up, you can then install Greenbird’s "Kotlin for Flow Developers" course and/or the Kotlin team’s own "Kotlin Koans" exercises.

Kotlin for Flow Developers

The Kotlin for Flow Developers course is a series of code examples and exercises that serve as an introduction to the Kotlin programming language. Specifically, it focuses only on the essentials needed to write and test flows with the Utilihive SDK.

The installation process is as follows:

  1. Download the Kotlin_for_Flow_Developers.zip archive.

  2. In IntelliJ, select File > Learn and Teach > Browse Courses.

  3. Select "My Courses" on the left.

  4. Select "Open course from disk".

  5. Navigate to the zip file and open it.

The process will look like the following image:

The My Courses tab in the Select Course window displays an option to open a course from disk.
If you already have one or more courses installed, the "Open course from disk" option will appear at the bottom of the window.

For best results, you will want to change the JDK that the course uses to Java 17, which you should already have from the SDK installation guide. The following image highlights where the JDK can be changed from the course introduction window:

The course introduction window includes an option to change the JDK.

Kotlin Koans

The Kotlin Koans are a series of exercises presented as failing unit tests. They make for a great next step after completing the Kotlin for Flow Developers course, especially if you want to dive deeper into Kotlin syntax and its features.

To install the Koans, follow these steps:

  1. In IntelliJ, select File > Learn and Teach > Browse Courses.

  2. In the Marketplace tab, scroll down to Kotlin Koans.

  3. Select the Start button on the right.

The process will look like the following image:

The Marketplace tab in the Select Course window displays a list of available courses,with Kotlin Koans highlighted.

Also check out the official Kotlin documentation and the Kotlin Core track from the JetBrains Academy team for more Kotlin help.