I've been trying KMP for awhile now and the Android/ios side is not bad. I'm trying to add desktop and shared compose code and gradle is killing me. Every time I fix 1 error, another one comes up. Google search doesn't help because this is too new. Compose compiler keeps complaining about a version of compose that I am not using. I've tried upgrading to Kotlin 1.5.30 to see if that would help. No luck
s
Sam
09/10/2021, 5:31 PM
I don’t know if desktop Compose is different but Jetpack Compose needs Kotlin 1.5.21 for now.
☝️ 1
k
kevindmoore
09/10/2021, 6:52 PM
I believe the version I am using is compatible and will handle lower versions as well
l
louiscad
09/10/2021, 7:11 PM
You can use the alpha version of the compose compiler that works with 1.5.30
k
kevindmoore
09/10/2021, 9:24 PM
That's what I am trying to do. I believe I'm using the latest alpha
d
darkmoon_uk
09/11/2021, 1:34 AM
While I don't have the time to walk through it right now @kevindmoore, I can confirm that sharing code between Android and Desktop via KMP is fully working for me, with the latest Compose/MP artifacts. Configuring this is definitely a learning curve but sometimes it helps just to hear from someone that is possible!
k
kevindmoore
09/11/2021, 6:14 PM
I finally got it working. I started from a known state and slowly built up using another project as an example. Using 1.5.21 seems to be working. Lots of fixes had to be done