Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kotlinx.coroutines | 12,256 | 232 | 5 days ago | 17 | July 25, 2023 | 280 | apache-2.0 | Kotlin | ||
Library support for Kotlin coroutines | ||||||||||
Coil | 9,550 | 40 | 3 days ago | 23 | May 21, 2023 | 31 | apache-2.0 | Kotlin | ||
Image loading for Android backed by Kotlin Coroutines. | ||||||||||
Compressor | 6,557 | a year ago | 4 | March 22, 2021 | 125 | Kotlin | ||||
An android image compression library. | ||||||||||
Kotlin Coroutines And Flow Usecases On Android | 2,444 | a month ago | 4 | apache-2.0 | Kotlin | |||||
๐ Learning Kotlin Coroutines and Flows for Android by example. ๐ Sample implementations for real-world Android use cases. ๐ Unit tests included! | ||||||||||
Splitties | 2,380 | 4 days ago | 9 | August 20, 2021 | 49 | apache-2.0 | Kotlin | |||
A collection of hand-crafted extensions for your Kotlin projects. | ||||||||||
Ktx | 1,254 | 4 | 2 months ago | 38 | July 23, 2023 | 9 | cc0-1.0 | Kotlin | ||
Kotlin extensions for the libGDX game framework | ||||||||||
Paperplane | 1,138 | 5 years ago | 3 | apache-2.0 | Kotlin | |||||
๐ PaperPlane - An Android reading app, including articles from Zhihu Daily, Guokr Handpick and Douban Moment. | ||||||||||
Flowbinding | 875 | 13 | 7 months ago | 20 | July 04, 2021 | 6 | apache-2.0 | Kotlin | ||
Kotlin Coroutines Flow binding APIs for Android's platform and unbundled UI widgets, inspired by RxBinding. | ||||||||||
Kord | 770 | a day ago | 18 | July 10, 2022 | 42 | mit | Kotlin | |||
Idiomatic Kotlin Wrapper for The Discord API | ||||||||||
Kotlin Coroutines Retrofit | 768 | 26 | 4 years ago | 20 | February 11, 2019 | 3 | apache-2.0 | Kotlin | ||
Kotlin Coroutines await() extension for Retrofit Call |
Library support for Kotlin coroutines with multiplatform support.
This is a companion version for the Kotlin 1.8.20
release.
suspend fun main() = coroutineScope {
launch {
delay(1000)
println("Kotlin Coroutines World!")
}
println("Hello")
}
Play with coroutines online here
CompletableFuture
and JVM-specific extensions.Promise
via Promise.await and promise builder;Window
via Window.asCoroutineDispatcher, etc.Add dependencies (you can also add other modules that you need):
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
<version>1.7.3</version>
</dependency>
And make sure that you use the latest Kotlin version:
<properties>
<kotlin.version>1.8.20</kotlin.version>
</properties>
Add dependencies (you can also add other modules that you need):
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
}
And make sure that you use the latest Kotlin version:
plugins {
// For build.gradle.kts (Kotlin DSL)
kotlin("jvm") version "1.8.20"
// For build.gradle (Groovy DSL)
id "org.jetbrains.kotlin.jvm" version "1.8.20"
}
Make sure that you have mavenCentral()
in the list of repositories:
repositories {
mavenCentral()
}
Add kotlinx-coroutines-android
module as a dependency when using kotlinx.coroutines
on Android:
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
This gives you access to the Android Dispatchers.Main coroutine dispatcher and also makes sure that in case of a crashed coroutine with an unhandled exception that this exception is logged before crashing the Android application, similarly to the way uncaught exceptions in threads are handled by the Android runtime.
R8 and ProGuard rules are bundled into the kotlinx-coroutines-android
module.
For more details see "Optimization" section for Android.
The kotlinx-coroutines-core
artifact contains a resource file that is not required for the coroutines to operate
normally and is only used by the debugger. To exclude it at no loss of functionality, add the following snippet to the
android
block in your Gradle file for the application subproject:
packagingOptions {
resources.excludes += "DebugProbesKt.bin"
}
Core modules of kotlinx.coroutines
are also available for
Kotlin/JS and Kotlin/Native.
In common code that should get compiled for different platforms, you can add a dependency to kotlinx-coroutines-core
right to the commonMain
source set:
commonMain {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
}
}
No more additional dependencies are needed, platform-specific artifacts will be resolved automatically via Gradle metadata available since Gradle 5.3.
Platform-specific dependencies are recommended to be used only for non-multiplatform projects that are compiled only for target platform.
Kotlin/JS version of kotlinx.coroutines
is published as
kotlinx-coroutines-core-js
(follow the link to get the dependency declaration snippet) and as kotlinx-coroutines-core
NPM package.
Kotlin/Native version of kotlinx.coroutines
is published as
kotlinx-coroutines-core-$platform
where $platform
is
the target Kotlin/Native platform.
Targets are provided in accordance with official K/N target support.