Random observation. If compose resources don't get...
# compose
a
Random observation. If compose resources don't get generated for any reason, try
./gradlew clean
and then a rebuild from the IDE. Worked everytime so far PS: It seems like the dependency >has< to be on common
👍 1
Talked too fast. Moments later I find myself resources not being generated
k
Yes. The Dependency must be in the common source set. Because a root "Res" class is generated in the common
a
Do u think it's possible to fail the build if it is not used from a non common module? Would be great because right now it's very confusing to figure out why the Res is not generated. I would imagine that is tricky if you have a multiplatform project that uses only one source set.
t
yes there is a way to detect the source set in gradle plugin, after that its just throwing an error, i'd open a pr honestly but till this day i haven't been able to figure out where the plugin code is
k
to fail the build if it is not used from a non common module
what if I don't use Compose resources?
a
what if I don't use Compose resources?
i am not sure I understand the question in the context of this. if you don't use compose resources then nothing would happen.
k
The generator is enabled when the library is presented.
a
I am not connecting the dots. What I am saying is that if one tries to add the compose resources dependency in a non common source set, it would be great for the compose plugin to fail the build, prompting the dev to use it in the common module. If you dont use the compose resources, there nothing needs to change
k
No. Imagine android only project wants to use resources from different module
t
but isn't android only resources different from multiplatform resources?
k
the case when an android app uses cmp module with public compose resources
a
the case when an android app uses cmp module with public compose resources
break the build if something is misconfigured. that's the idea. if you have a multiplatform project with only an android target, and that's a valid target to use the resources, then nothing should happen