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:
Go to Tools → Kotlin → Configure Kotlin Plugin Updates, select “Stable” in the Update channel drop-down list, and then click Check for updates. We are adding coroutines-core along with coroutines-android. Now, sync your project with gradle files and you are ready use the latest Coroutines.
We can add the Goroutine to the Go program by adding the keyword go in front of the function execution. Once we add the go keyword in front of the self-executing function, we are adding concurrency to the execution. Let's see the impact of adding the go keyword to the above execution.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With