Hello Kotlin/Native using IntelliJ IDEA
|Last Updated||15 January 2020|
Creating a new Kotlin/Native project in IntelliJ IDEA
This following is applicable to both IntelliJ IDEA Community Edition as well as the Ultimate Edition.
From the File menu in IntelliJ IDEA or Welcome screen, select to create a new Project and in the first step of the Wizard select Kotlin on the left hand column and Native | Gradle on the right hand.
Click Next in the dialog and in the next step make sure Automatically import this project on changes in build script is checked. This is useful when starting out to make sure any immediate changes to the build script are imported automatically.
On clicking Next, enter the path and name for the project.
This will complete the process and open the newly created project in the IDE. By default the wizard will create the necessary
Sample<TARGET>.kt file and provide code for writing some string to the standard output. Note that
<TARGET> varies based on the operating
system the project was created on (Windows, Linux, macOS).
To run the project, simply invoke the Run command in the IDE, by using the corresponding shortcuts or from the Run menu
The sample project can serve as the basis for any new project for Kotlin/Native.
For further information, check out: