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

Myo Lwin Oo

11/02/2023, 9:55 AM
Hello, I'm trying to use Kotlin 1.9.20 in my android project with compose. But compose compiler version for Kotlin 1.9.20 is not ready yet. What can I do for this?
1
m

mohamed rejeb

11/02/2023, 10:03 AM
Have you tried 1.5.3 ? it should work. For compose multiplatform 1.5.10 is based to 1.5.3 compiler version and it's working fine with kotlin 1.9.20
m

Myo Lwin Oo

11/02/2023, 10:14 AM
I'm currently using compose compiler 1.5.3 and I got a build error like this.
m

mohamed rejeb

11/02/2023, 10:19 AM
Try to suppress it and see what happens, because CMP is already using compose compiler 1.5.3 and it is working fine.
m

Myo Lwin Oo

11/02/2023, 10:38 AM
Tried to suppress like this but didn't work.
Copy code
kotlinOptions {
        // other configurations
        freeCompilerArgs += listOf(
            "-Xallow-jvm-ir-dependencies",
            "-P",
            "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
        )
    }
a

ascii

11/02/2023, 10:51 AM
You have to wait for an official "stable" release, or resort to using pre-release snapshots from https://androidx.dev/storage/compose-compiler/repository
🙌 1
☝️ 1
m

Myo Lwin Oo

11/02/2023, 10:52 AM
Thanks I also found that one too. And I'm just wondering if there's any workaround before the stable release comes out. 🙏
a

ascii

11/02/2023, 10:54 AM
Don't think so. It's a bit annoying to have to wait for Compose compiler to catch up even though most other kotlin-dependent libs have quicker releases.
🙌 1
https://issuetracker.google.com/issues/267642555 was linked here yesterday. Adding a +1 wouldn't hurt.
🙌 1
m

Myo Lwin Oo

11/02/2023, 1:01 PM
Will do. Thanks guys. 🙏
l

Landry Norris

11/02/2023, 5:24 PM
The compiler for CMP is separate from the jetpack compose compiler. Changes from CMP get merged back eventually, and vice versa, but this time, CMP got updated first.
🙌 1
33 Views