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

John O'Reilly

01/17/2023, 8:09 PM
Version 1.4 of Compose Compiler released with support for Kotlin 1.8 (https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.4.0)
🎉 30
❤️ 4
7
🦜 3
🍀 8
K 18
4️⃣ 8
p

Pablichjenkov

01/17/2023, 8:24 PM
Fixed faulty code generation for inline lambda
☝️This release note sounds good!
m

Michael Paus

01/18/2023, 10:03 AM
Is that somehow usable for compose desktop too?
j

John O'Reilly

01/18/2023, 10:09 AM
yes, you can use following in your compose desktop
build.gradle.kts
Copy code
compose {
    kotlinCompilerPlugin.set("1.4.0")
}
there's example of doing that in https://github.com/joreilly/FantasyPremierLeague
m

Michael Paus

01/18/2023, 10:28 AM
That’s what I did but I only got a
Copy code
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.jetbrains.compose.compiler:compiler:1.4.0.
It works with
1.4.0-alpha04
though.
Just looking at https://github.com/joreilly/FantasyPremierLeague/blob/main/build.gradle.kts (at the end) you seem to be doing a lot more than just adding the above 3 lines 😉.
j

John O'Reilly

01/18/2023, 10:44 AM
ah, yes....had that from before and forgot it was there!
m

Michael Paus

01/18/2023, 10:45 AM
But it is still valid and needed, isn’t it?
j

John O'Reilly

01/18/2023, 10:50 AM
so....just trying it out here....and looks like with 1.3.x version of Compose for Desktop (e,g
1.3.0-rc03
) that that shouldn't be necessary but you also need to take out the
kotlinCompilerPlugin
block I mentioned above
I guess it now has it's own 1.8 compatible version of compose compiler....
m

Michael Paus

01/18/2023, 10:54 AM
Yes, I also think so because 1.8 is not the problem. It works for desktop and android. I was hoping to fix this iOS bug that way. https://github.com/JetBrains/compose-jb/issues/2635
35 Views