Installing from the source

In order to install Kotlin Native on our machine, we need to compile it from the source. Follow these steps to download the source and compile it:

  1. Clone the Kotlin Native compiler source using the following command:
      git clone https://github.com/JetBrains/kotlin-native.git
  1. Let's switch to the cloned directory using  cd kotlin-native.
  2. Download the dependencies using ./gradlew dependencies:update.
  3. Then build the compiler and libraries. We should use ./gradlew bundle, but it can take a few hours to build. Therefore, we will build only with the host compiler and the libraries using ./gradlew dist distPlatformLibs, which should build pretty quickly.
  4. Add the Kotlin compiler to the environment variables (the steps to ...

Get Kotlin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.