Skip to content
Advertisement

Integrate Kotlinx coroutines in intelliJ project

I‘m using intellij for a while now. There I work on a javaFx project, which is mainly written in java but I discovered Kotlin to be a nice alternative.

Recently I read about coroutines in Kotlin and I just can‘t figure out how to add the Kotlinx library to my project. I can only find the snippets for maven and gradle. But I‘m a complete nobby at this and I don‘t use one of this (At least I think so). So how can I add the kotlinx stuff to my project???

Kotlinx: KotlinX coroutines

Project structure: enter image description here

Advertisement

Answer

In the Project Structure dialog, go to Project Settings | Libraries, press “+” button and select “From Maven…” in the popup. In the dialog that appears, enter the name and version of the library you need, which you can find out in the documentation. (For the current version of the core library of kotlinx.coroutines, enter org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2). Then select the modules to which the library will be added.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement