The KMP gradle plugin doesn't support jetpack comp...
# multiplatform
a
The KMP gradle plugin doesn't support jetpack compose. Any work around apart from using the id("kotlin-android")?
z
I don’t think there is any for now 😕 https://youtrack.jetbrains.com/issue/KT-38694
c
This project uses Jetpack compose and Swift UI https://github.com/joreilly/PeopleInSpace
z
@Chetan Sachdeva The problem is when you use compose in the KMP module. In the project you linked they use compose in a pure android app module
👌 1
c
Oh I see. Ideally, the UI code shouldn’t go in KMP module (
androidMain
). But if that’s whats intended, I’d recommend https://github.com/icerockdev/moko-widgets
1
j
I wouldn't consider that being ideal, but rather a side effect of Compose still being in early development. The team behind has explained that currently compose depends on some custom changes being applied through AGP, but after removing or refactoring some dependencies this will change.
s
Compose uses a custom compiler version + plugin. You can force it for kmp module as well, but I suspect it will affect js compilation at least. AGP does something like this, so you can try to add it to your module to force compiler version.
a
@shikasd It indeed affected js compilation