
Compose utilities offering serializable resource wrappers (StrRes, PlatformStrRes), configurable string/plural resolvers, and context extensions to resolve resources inside Composable UIs.
Kotlin Multiplatform utilities for Compose Multiplatform (Android + iOS).
| Module | Description |
|---|---|
| kotose-resources | Serializable resource management (StrRes, PlatformStrRes) |
| kotose-core | Android context extensions |
// Resources (StrRes, PlatformStrRes, serialization)
implementation("io.github.robinpcrd:kotose-resources:<VERSION>")
// Android context extensions
implementation("io.github.robinpcrd:kotose-core:<VERSION>")// Setup (once, at app init)
KotoseUtils.setup {
androidContext(context) // Android only - enables getStringSuspend()
stringResourceResolver { key -> Res.allStringResources[key] }
pluralStringResourceResolver { key -> Res.allPluralStringResources[key] }
}
// Create resources
val text = "Hello".toStrRes()
val compose = Res.string.app_name.toStrRes()
val android = R.string.greeting.toStrRes() // Android only
// Resolve in Composable
@Composable
fun Greeting(strRes: StrRes) {
Text(strRes.getStringOrEmpty())
}See module READMEs for detailed usage.
See CONTRIBUTING.md for build, test, and contribution guidelines.
Copyright 2025-present Robin PICARD and contributors.
Licensed under the Apache License, Version 2.0.
Originally created at PandaLab.
Kotlin Multiplatform utilities for Compose Multiplatform (Android + iOS).
| Module | Description |
|---|---|
| kotose-resources | Serializable resource management (StrRes, PlatformStrRes) |
| kotose-core | Android context extensions |
// Resources (StrRes, PlatformStrRes, serialization)
implementation("io.github.robinpcrd:kotose-resources:<VERSION>")
// Android context extensions
implementation("io.github.robinpcrd:kotose-core:<VERSION>")// Setup (once, at app init)
KotoseUtils.setup {
androidContext(context) // Android only - enables getStringSuspend()
stringResourceResolver { key -> Res.allStringResources[key] }
pluralStringResourceResolver { key -> Res.allPluralStringResources[key] }
}
// Create resources
val text = "Hello".toStrRes()
val compose = Res.string.app_name.toStrRes()
val android = R.string.greeting.toStrRes() // Android only
// Resolve in Composable
@Composable
fun Greeting(strRes: StrRes) {
Text(strRes.getStringOrEmpty())
}See module READMEs for detailed usage.
See CONTRIBUTING.md for build, test, and contribution guidelines.
Copyright 2025-present Robin PICARD and contributors.
Licensed under the Apache License, Version 2.0.
Originally created at PandaLab.