Is there any plan to add support for something lik...
# moko
s
Is there any plan to add support for something like Android's build types to moko resources? I have some resources that depend on the build type. It would be amazing if it was possible to specify that in the moko config and have it conditionally include another directory. ie.
moko-resources-<buildType>
🙌 1
a
no, we not have such plans
with 0.24.0 you can use source sets hierarchy for separated resources on different source sets branches. maybe it can be useful for your case too
s
Thanks, I might be able to make that work.
If it's possible, I can't figure out how to make it work. It builds an MR object for commonDebug, and commonMain, but I can't see how they would be differentiated. Without a way to insert the values from one into the other, I think the only way would be for each value to be defined as an extension. ie
expect val ResourceContainer<StringResource>.app_name: StringResource
a
as i know commonDebug sourceset not exist at all. i suggest you to create hierarchy like:
Copy code
- commonMain
-- debugMain
--- androidDebugMain
--- iosDebugMain
-- releaseMain
--- androidReleaseMain
--- iosReleaseMain
but i dont know is it possible to register two android target in one project or not...it's just idea to test, i don't know is it will work or not
s
commonDebug is a source set I created to share resources between androidDebug and (conditionally) jvmMain
I don't have androidDebugMain or debugMain. I see: commonMain, androidMain, jsMain, jvmMain, androidDebug, androidRelease. also commonDebug and commonRelease that I created, and a bunch of variations with Test in the name.