JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
14.85k stars 1.08k forks source link

Support Kotlin 2.0.0-RC2 #4732

Closed ZacSweers closed 2 weeks ago

ZacSweers commented 2 weeks ago

When testing with RC2 and the new compose compiler plugin, the gradle plugin fails due to

Compose Multiplatform 1.6.2 doesn't support Kotlin 2.0.0-RC2. Please see https://github.com/JetBrains/compose-jb/blob/master/VERSIONING.md#kotlin-compatibility to know the latest supported version of Kotlin.

My understanding is this should not longer be a scenario developers have to deal with per

https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compiler.html#migrating-a-jetpack-compose-project

https://android-developers.googleblog.com/2024/04/jetpack-compose-compiler-moving-to-kotlin-repository.html

Can this max version restriction be removed in favor of the first party plugin in K2 onward?

igordmn commented 2 weeks ago

It is supported in 1.6.10-beta03. The stable release is planned near the stable release of Kotlin 2.0.0

igordmn commented 2 weeks ago

This can be used for CMP 1.6.2:

compose {
    kotlinCompilerPlugin = "org.jetbrains.kotlin:kotlin-compose-compiler-plugin-embeddable:2.0.0-RC2"
}