For a multiplatform project containing android, iO...
# compose-desktop
j
For a multiplatform project containing android, iOS and js, Is there any way you can continue using
commonMain
dependencies for compose and just tell the iOS target not to try finding the dependencies for compose? Or do I need to set up the compose dependencies for each target?
1
b
Or... Just move ios bit out into its own module and have them all depend on a thrird shared module
mind blown 1
d
As one example of where you can go with sourceSets, here's the setup for just the presentation-layer module in my project:
...will be adding iOS to the mix later.
As a visual check I ended up making some code in Gradle to generate a sourceSet GraphViz graph for every module, when Gradle syncs.
materialComposeMain
would be the relevant one for you here. That has the common Compose API's between Android and Desktop.
The further
graphicalMain
source-set was introduced to separate the radically different ViewModels between graphical and CLI clients.
I am starting to question when it's a sourceSet too far and I might be better off using normal modules, though 😅