Carthas Common is a collection of utilities designed to streamline our development with Compose Multiplatform. It offers shared tools and abstractions to enhance code reuse and maintainability across Android, iOS, desktop, and web platforms.
- Lightweight MVI base classes and fully object-oriented navigation
- Several idiomatic DSL extensions for common CMP use cases
- Modifier.shader implementations for custom SkSL shader application
- Supports Android, Desktop, iOS, and Web (Wasm) targets
- In order for your
Screenimplementations to be able to use theCarthasContentDSL function, you must have Koin set up in your application, withscopeddefinitions for all yourCarthasViewModelimplementations. We strongly recommend using thescopedViewModelOf()helper functions that we provide, to ensure that your VM resources are cleared when the VM goes out of scope.
Add the following to your libs.versions.toml file:
[versions]
carthas-common = "0.7.0"
[libraries]
carthas-common = { module = "com.carthas:common", version.ref = "carthas-common" }Then, include it in your build.gradle.kts:
dependencies {
implementation(libs.carthas.common)
}