Does Moko Resources handle strings from separate A...
# moko
m
Does Moko Resources handle strings from separate Android build variants? I haven't been able to make that work. I notice in your answer last year you suggest having variant specific string files, presumably in co-operation with a commonMain one, but I can't get it to work. What's required?
a
hi. moko-resources generates android resources in
androidMain
sourceset. it not handle build variants, so you got same resources in all build variants
m
Yes, I understand that, but what about additional flavour specific resources? Does your answer referred to above suggest that's a possibility, or doesn't it that work like that?
a
can you give more details? i dont understand what additional flavour specific resources you mean
m
I have different websites for different stages (development, testing, release) and different flavours for those stages, so, although almost all strings aren't flavour specific, these are and I hope to have them in flavour specific strings.xml, hoping that the build will merge them.
a
multiplatform module not have flavors analog. you can pass different strings by DI from platform app side. on android will use flavors, on ios will use schemas & configurations. in our template we pass baseUrl same way - https://gitlab.icerockdev.com/scl/boilerplate/mobile-moko-boilerplate/-/blob/master/mpp[…]src/commonMain/kotlin/org/example/library/SharedFactory.kt
u
@alex009 I am searching for something similar for our app - the app has different “flavors” for different customers with custom colors, images, strings… So one fat library with all assets will not fulfil the needs. I am currently thinking about different Moko-Resource-Library-Projects, but I am not sure that this would fix all our needs…
Btw: the “base-resource-path” `shared/src/commonMain/resources/MR`is not adjustable, isn’t it?
a
yes, resource path can't be changed