Hi folks, i have a Compose multiplatform projects ...
# compose-desktop
s
Hi folks, i have a Compose multiplatform projects that is modular, each module can have it own resources in commonMain/resources, but at the final desktop module (the application one), when running, the resources files is not transitive being add to the application jar file to be used. How can I make all resource files for all modules be available in the desktop app?
1
c
This should work for JVM targets 🤔 I know it currently doesn't with JS
d
I made a sample, how you can share resources between different jvm modules and commonMain and jvmMain sourcesets. https://github.com/dima-avdeev-jb/jvm-share-multimodule-resources Also, for multiplatform modules, you can look at an experimental library here: https://github.com/JetBrains/compose-jb/tree/master/components/resources
j
I thought that the
res
merging is an Android feature that is not on normal
resources
m
Is that experimental library not yet included in the current build of the compose libraries? I could not get the package resolved in 1.3.0-rc05.
c
Thank you @Dima Avdeev, but I only saw the resource being pulled into the desktop app!
Man, @Javier, I actually found your library by accident, did you created a solution based on the jetbrains source? I was thinking about doing something like this instead of having some side module in my project. Do you need help?
j
do you mean compose resources? the expect actual part is one line if I remember correctly
Ok, there was no explanation on the README and I already spent a reasonable time digging into the JB source, thought better just ask 🙂
You say for KMM the solution is a one liner?
j
I think the solution I have there was put in moko resources too
I haven't added iOS support
c
I'm just interested in the Android/Desktop stuff! Thank you very much.
j
my plugin only allow using different drawables based on the theme, but the real utilities are on moko at the end
143 Views