How can I use Kotlin 1.4.21? `e: This version (1....
# compose-desktop
k
How can I use Kotlin 1.4.21? `e: This version (1.0.0-alpha09) of the Compose Compiler requires Kotlin version 1.4.20 but you appear to be using Kotlin version 1.4.21 which is not known to be compatible. Please fix your configuration (or
suppressKotlinVersionCompatibilityCheck
but don't say I didn't warn you!).`
z
You have to wait for Compose to support 1.4.21. I believe there’s a CL open for that right now, so probably in the next release or two
☝️ 1
k
Thank you.
j
r
I suppose alpha09 is not released yet
k
Yeah, but it may be a snapshot
s
In general you can pass the plugin configuration as part of Kotlin compile task if you really want to use
1.4.21
Copy code
withType<KotlinCompile>().configureEach {
        kotlinOptions {
            freeCompilerArgs += listOf(
                "-progressive",
                "-Xjsr305=strict",
                "-P",
              "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
            )
        }
    }
👆 1
👍 2
k
But it says
Source file or directory not found: plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true
I'm using Compose for Desktop
s
@Kyant you need to pass
"-P"
also
k
I have added it, gradle could synced, but still couldn't compile.
s
Copy code
kotlin("jvm") version "1.4.21"
id("org.jetbrains.compose") version "0.3.0-build134"
It's working for me. I am using these deps. Are you using multiplatform?
k
Yes