List of Kotlin Multiplatform Library
This is a curated list of open-source Kotlin Multiplatform libraries to streamline your development process.
Network Libraries
- Ktor (official): Powerful HTTP client and server framework for building modern web applications. (https://ktor.io/)
- OkHttp (compatible): Popular HTTP client for asynchronous and efficient networking. (https://square.github.io/okhttp/)
- Retrofit (compatible, with some limitations): Type-safe HTTP client for building REST APIs. (https://square.github.io/retrofit/)
Database Libraries
- SqlDelight (official): Declarative SQL for Kotlin Multiplatform, generating platform-specific code for Android, iOS, and more. (https://github.com/cashapp/sqldelight)
- Room (compatible, Android-specific): Powerful object-relational mapper (ORM) for Android. (https://developer.android.com/training/data-storage/room)
- Realm (compatible): Cross-platform mobile database with a fluent API. (https://www.mongodb.com/docs/atlas/device-sdks/)
Dependency Injection
- Koin (official): Feature-rich dependency injection framework for Kotlin. (https://insert-koin.io/)
- Kodein (compatible): Lightweight dependency injection framework. (https://github.com/kosi-libs/Kodein)
ViewModel Libraries
- MVIKotlin (official): MVI (Model-View-Intent) framework for building predictable and testable applications. (https://github.com/arkivanov/MVIKotlin)
- Orbit (Redux/MVI-like): MVI library targeting Android and iOS, inspired by Redux. (https://github.com/orbit-mvi)
- FlowMVI (MVI with coroutines): KMP MVI library based on coroutines with a rich DSL and plugin system.(https://github.com/respawn-app/FlowMVI)
Navigation Libraries
- kompass (official): Kotlin Multiplatform router for Android and iOS, inspired by Jetpack Navigation and SwiftUI Navigation. (https://github.com/sellmair/kompass)
- Decompose (lifecycle-aware components): Multiplatform lifecycle-aware business logic components (BLoCs) with routing functionality and pluggable UI for Android, iOS, Web, and more. (https://github.com/arkivanov/decompose-multiplatform-template)
- Decompose-Router (Compose navigation): Compose multiplatform navigation library inspired by Decompose and Conductor.(https://github.com/xxfast/Decompose-Router)
Storage Management Libraries
- Kotlin Serialization (official): Comprehensive serialization and deserialization framework for various data formats. (https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serialization-guide.md)
- Secure Preferences (Android/JVM): Securely store key-value data on Android or JVM platforms. (https://github.com/scottyab/secure-preferences)
- MMKV (iOS/Android/Web): Ultra-fast key-value storage that outperforms NSUserDefaults and SharedPreferences. (https://github.com/Tencent/MMKV)
Logging Libraries
- Napier (official): Multiplatform logger with support for Android, iOS, JVM, and JavaScript. (https://github.com/AAkira/Napier)
- Kermit (composable log outputs): Multiplatform logging utility with composable log outputs for platform-specific logging tools.(https://github.com/touchlab/Kermit)
- Canard (lightweight): Lightweight Kotlin/Multiplatform logging library with a simple API.(https://github.com/kosi-libs/Canard)
UI Libraries
- Compose for Web (experimental): Multiplatform version of Jetpack Compose for building web applications. (https://developer.android.com/develop/ui/compose)
- KMM-UI (experimental): Multiplatform UI framework powered by Compose and Compose for Web, facilitating code sharing across platforms. (https://github.com/topics/compose-multiplatform)
Testing Libraries
- Kotlinx.Test (official): Multiplatform testing library for unit and integration tests. (https://kotlinlang.org/api/latest/kotlin.test/)
- KSpresso (compatible, Android-specific): Robust Android UI testing framework, can be used with KMP for certain scenarios. (https://github.com/KasperskyLab/Kaspresso)
Other
- Koin (official): Dependency injection framework for Kotlin. (https://insert-koin.io/)
- Kodein (compatible): Lightweight dependency injection framework. (https://github.com/kosi-libs/Kodein)
Disclaimer:
This list is not exhaustive and is subject to change. Please refer to the official documentation and repositories of each library for the latest information.
Contributions:
Feel free to submit pull requests to add or update libraries in this list.