The Compose compiler is supplemented by a Gradle plugin, which simplifies setup and offers easier access to compiler options. When applied with the Android Gradle plugin (AGP), this Compose compiler plugin will override the coordinates of the Compose compiler supplied automatically by AGP.
The Compose compiler has been merged into the Kotlin repository since Kotlin 2.0.0. This helps smooth the migration of your projects to Kotlin 2.0.0 and later, as the Compose compiler ships simultaneously with Kotlin and will always be compatible with Kotlin of the same version.
warning
It is strongly recommended that you update your Compose Multiplatform app created with Kotlin 2.0.0 to version 2.0.10 or later. The Compose compiler 2.0.0 has an issue where it sometimes incorrectly infers the stability of types in multiplatform projects with non-JVM targets, which can lead to unnecessary (or even endless) recompositions.
If your app is built with Compose compiler 2.0.10 or later but uses dependencies built with Compose compiler 2.0.0, these older dependencies may still cause recomposition issues. To prevent this, update your dependencies to versions built with the same Compose compiler as your app.
To use the new Compose compiler plugin in your project, apply it for each module that uses Compose. Read on for details on how to migrate a Compose Multiplatform project. For a Jetpack Compose project, refer to the migration guide.
Migrating a Compose Multiplatform project
Starting with Compose Multiplatform 1.6.10, you should apply the org.jetbrains.kotlin.plugin.compose Gradle plugin to each module that uses the org.jetbrains.compose plugin:
If you are using compiler options for the Jetpack Compose compiler, set them in the composeCompiler {} block. See Compose compiler options DSL for reference.
Possible issue: "Missing resource with path"
When switching from Kotlin 1.9.0 to 2.0.0, or from 2.0.0 to 1.9.0, you may encounter the following error:
org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: ...
To resolve this, delete all the build directories: at the root of your project and in each of the modules.
What's next
See Google's announcement about the Compose compiler moving to the Kotlin repository.