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
alex009
02/20/2024, 4:34 AM
no, we not have such plans
alex009
02/20/2024, 4:35 AM
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
Sean Proctor
02/20/2024, 1:14 PM
Thanks, I might be able to make that work.
Sean Proctor
02/20/2024, 3:08 PM
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
alex009
02/20/2024, 4:27 PM
as i know commonDebug sourceset not exist at all.
i suggest you to create hierarchy like:
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
Sean Proctor
02/20/2024, 4:30 PM
commonDebug is a source set I created to share resources between androidDebug and (conditionally) jvmMain
Sean Proctor
02/20/2024, 4:37 PM
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.