https://kotlinlang.org logo
Title
k

Kyant

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

Zach Klippenstein (he/him) [MOD]

12/11/2020, 11:11 PM
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

Kyant

12/11/2020, 11:19 PM
Thank you.
j

jim

12/12/2020, 12:04 AM
r

rsktash

12/12/2020, 12:05 AM
I suppose alpha09 is not released yet
k

Kyant

12/12/2020, 12:06 AM
Yeah, but it may be a snapshot
s

suresh

12/12/2020, 2:03 AM
In general you can pass the plugin configuration as part of Kotlin compile task if you really want to use
1.4.21
withType<KotlinCompile>().configureEach {
        kotlinOptions {
            freeCompilerArgs += listOf(
                "-progressive",
                "-Xjsr305=strict",
                "-P",
              "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
            )
        }
    }
👆 1
👍 2
k

Kyant

12/12/2020, 2:30 AM
But it says
Source file or directory not found: plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true
I'm using Compose for Desktop
s

suresh

12/12/2020, 5:34 AM
@Kyant you need to pass
"-P"
also
k

Kyant

12/12/2020, 5:40 AM
I have added it, gradle could synced, but still couldn't compile.
s

suresh

12/12/2020, 5:55 AM
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

Kyant

12/12/2020, 5:59 AM
Yes