Is it possible to use multiplatform gradle plugin ...
# compose
d
Is it possible to use multiplatform gradle plugin to try @Composable functions ?
Copy code
plugins {
    id("com.android.library")
    kotlin("multiplatform")
}
instead of
Copy code
plugins {
    id("com.android.library")
    id("kotlin-android")
}
j
I am using this code and it is working without problems
Copy code
plugins {
    id("com.android.library")
    id("org.jetbrains.kotlin.multiplatform")
    id("org.jetbrains.kotlin.plugin.serialization")
}
a
Thats good news to hear. It was a problem previously. Maybe it got fixed?
j
I don't know, I am using that config for months, it is working with 1.4 M2 too, I didn't try to update to RC or M3 but I think it should work
m
There are multiple multiplatform projects using jetpack compose and even swiftui. e.g. https://github.com/joreilly/PeopleInSpace
j
But PeopleInSpace doesn't use
multiplatform
and
compose
in the same module. The whole UI logic is part of the
app
module. @Javier could you share the configuration you're using? I've been struggling quite a bit with that
a
I have struggled with this too, I would like to see @Javier's
build.gradle.kts
configuration
And that was the last time we saw @Javier
j
I haven't it on GitHub, I will try to check it later
d
I found Issue: https://youtrack.jetbrains.com/issue/KT-38694 You may vote for it
@andylamax @Javier @JCollardBovy @Michal Harakal I found workaround to use Composable functions with kotlin MPP and describe problem (current in Russian, latter will translate): You may use my sample project: https://github.com/avdim/compose_mpp_workaround
👍 3
👏 2