Hi all - Having issues with setting up desktop-com...
# compose-desktop
x
Hi all - Having issues with setting up desktop-compose in my project. As soon as i add any compose dependencies, my
commonMain
source set gets excluded from the build. I’m using AS Arctic fox 2020.3.1 with jetbrains compose
0.4.0-build179
i
Try to remove
compose.desktop.currentOs
from
commonMain
It is desktop-only and should be used only in
desktopMain
x
the issue still seems to be there unfortunately 😕 Here’s how my full build script looks like
This is my root build.gradle.kts
welp, im stumped. spent 3 hrs downgrading my gradle from 7.0 down to 4.0.1 to match example projects but this behaviour is still there
i
Try to open this template and gradually transform it to your project. This way you can find where is the issue. You can also try to copy
common
module to your project and register it in settings.gradle
x
thank you very much - will give that a try. I
mysteries of gradle - i followed your instruction and copy-pasta the common module over and even though it is source-wise identical to my
:search
module,
:common
compiled and build just fine. Thanks a lot @Igor Demin
🎉 1
well i think i’m a step closer to demystifying the mystery. it is adding
ios
target whats causing the error.
i
Look like it is a MPP plugin bug 😞
what if you remove jvm target? just to understand if it works without it
x
works without the jvm target
the more i dig down this rabbit hole, the weirder it gets. Sometimes the same behaviour can be seen when i add new dependencies to
commonMain
, and I’m guessing this error in the sync log has something to do with it
Copy code
Failed building KotlinMPPGradleModel
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find resources-generator-0.15.1-samplessources.jar (dev.icerock.moko:resources-generator:0.15.1).
found this issue that tells me that this could be because the library itself doesn’t support all targets
👍 1
i’m assuming that was the ultimate cause - because i addded
ios()
and one or more dependent libraries doesn’t support that target
There’s already another issue to improve the error message here, so i dont have to create another one 🙂
Thanks @Igor Demin 🙏