https://kotlinlang.org logo
#compose
Title
# compose
d

Dima Avdeev

07/28/2020, 10:10 AM
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

Javier

07/28/2020, 11:09 AM
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

andylamax

07/28/2020, 12:16 PM
Thats good news to hear. It was a problem previously. Maybe it got fixed?
j

Javier

07/28/2020, 12:20 PM
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

Michal Harakal

07/28/2020, 4:02 PM
There are multiple multiplatform projects using jetpack compose and even swiftui. e.g. https://github.com/joreilly/PeopleInSpace
j

JCollardBovy

07/28/2020, 8:07 PM
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

andylamax

07/29/2020, 1:12 AM
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

Javier

07/29/2020, 12:46 PM
I haven't it on GitHub, I will try to check it later
d

Dima Avdeev

07/29/2020, 7:46 PM
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