I asked something similar before: since adding com...
# compose-ios
t
I asked something similar before: since adding compose mp to my KMP lib, I had to disable watchOS. What is likelihood that the compose mp could contain a stub at least for watchOS so I do not have to refactor my code and make multiple packages out of it? Thanks!
đź‘Ť 1
👍🏻 1
a
Perhaps, you can just move your Compose code to a mobileMain source set (which you have to create).
thank you color 1
t
I tried creating a composableMain source set, but it appears the compose plugin only works in commonMain…
Though perhaps they have changed it. I will try again.
a
Or extract your Compose code to a separate Gradle module. I would choose this option.
t
I am not a grádele expert. Might you be able to point of an example of this? Thank you!
a
it appears the compose plugin only works in commonMain
I don't think that's true. You can see here that I'm creating a
nonAndroidMain
source set. There's a composable function in it and it works well.
t
I mean that the compose plugin dependencies need to be in commonMain. In your example you have the same. If you try to move to some other source set compile errors will ensue.
d
@tylerwilson Please take a look this documentation: https://kotlinlang.org/docs/multiplatform-hierarchy.html