icerockdev / moko-resources

Resources access for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
1.12k stars 124 forks source link

Override moko resource in submodule #433

Closed Murtowski closed 1 year ago

Murtowski commented 1 year ago

Discussed in https://github.com/icerockdev/moko-resources/discussions/432

Originally posted by **Murtowski** February 27, 2023 Imagine that we have `common` KMM module that contains Moko `resources`. That module has a class with method which returns `ColorResource.Single` e.g. `MR.colors.primary` Then we have another `android` module which depends on module `common` (`implementation(project("common"))`) Is it possible to override in `android` module value of `MR.colors.primary` returned by `common` module ?
Alex009 commented 1 year ago

hi! no, it's not possible. you can override android resource, but for ios resources packed in bundle and each module have own bundle.