finds.dev← search

// the find

icerockdev/moko-resources

★ 1,346 · Kotlin · Apache-2.0 · updated May 2026

Resources access for mobile (android & ios) Kotlin Multiplatform development

moko-resources is a Kotlin Multiplatform library and Gradle plugin that gives you type-safe access to strings, images, colors, fonts, and files from shared commonMain code, with proper localization support on Android, iOS, macOS, JVM, and JS. It's for KMP teams who are tired of writing expect/actual boilerplate for every resource type. The Compose Multiplatform support means you can use `stringResource(MR.strings.foo)` in commonMain the same way you would in a pure Android project.

The code generation approach is solid — you get compile-time safety so a missing or renamed resource is a build error, not a runtime crash. Light/dark mode support for both images and colors is handled at the resource definition level, not scattered through UI code. The `StringDesc` abstraction is genuinely useful: it lets you defer string resolution (with context on Android, without on iOS) while keeping common logic in commonMain. Compose Multiplatform integration is a first-class citizen, not bolted on.

The iOS static framework setup is noticeably painful — you have to disable User Script Sandboxing in Xcode and add a manual build phase with a Gradle invocation, and if you get the order wrong resources silently don't show up. The JS/Browser story is awkward: strings require an async load (`MR.stringsLoader.getOrLoad()`) rather than being available synchronously like on other targets, which breaks the abstraction. Multi-module projects need the plugin applied in both the resource module AND the framework-producing module, which is a footgun that's not obvious until your iOS build is missing strings at runtime. The minimum requirement of Kotlin 2.1+ and AGP 8.3+ means you can't adopt this on older projects without a full upgrade.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →