You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: topics/compose/compose-compiler.md
+10-26Lines changed: 10 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,16 @@
1
1
[//]: #(title: Compose compiler)
2
2
3
-
<!-- this tip should be moved lower and possibly reworded after the 2.0.0 release -->
4
-
> The Compose compiler has been merged into the Kotlin repository since Kotlin 2.0.0-RC2.
5
-
> This helps smooth the migration of your projects to Kotlin 2.0, as the Compose compiler will ship simultaneously
6
-
> with Kotlin from now on and will always be compatible with Kotlin of the same version.
7
-
>
8
-
{type="tip"}
9
-
10
3
The Compose compiler is supplemented by a Gradle plugin, which simplifies setup and offers
11
4
easier access to compiler options.
12
5
When applied with the Android Gradle plugin (AGP), this Compose compiler plugin will override the coordinates
13
6
of the Compose compiler supplied automatically by AGP.
14
7
8
+
> The Compose compiler has been merged into the Kotlin repository since Kotlin %kotlinVersion%.
9
+
> This helps smooth the migration of your projects to Kotlin %kotlinVersion%, as the Compose compiler ships simultaneously
10
+
> simultaneously with Kotlin and will always be compatible with Kotlin of the same version.
11
+
>
12
+
{type="tip"}
13
+
15
14
To use it in your project, apply the plugin for each module that uses Compose. See the migration instructions below:
16
15
17
16
*[Migrating a Compose Multiplatform project](#migrating-a-compose-multiplatform-project)
@@ -20,15 +19,15 @@ To use it in your project, apply the plugin for each module that uses Compose. S
20
19
21
20
## Migrating a Compose Multiplatform project
22
21
23
-
Starting with 1.6.10, you should apply the `org.jetbrains.kotlin.plugin.compose` Gradle plugin to each
22
+
Starting with Compose Multiplatform 1.6.10, you should apply the `org.jetbrains.kotlin.plugin.compose` Gradle plugin to each
24
23
module that uses the `org.jetbrains.compose` plugin:
25
24
26
25
1. Add the Compose compiler Gradle plugin to the [Gradle version catalog](https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml):
27
26
28
27
```toml
29
28
[versions]
30
29
# ...
31
-
kotlin = "2.0.0-RC2"
30
+
kotlin = "%kotlinVersion%"
32
31
33
32
[plugins]
34
33
# ...
@@ -73,22 +72,7 @@ When switching from Kotlin 1.9.0 to 2.0.0, or from 2.0.0 to 1.9.0, you may encou
73
72
org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: ...
74
73
```
75
74
76
-
To resolve this, delete all of the `build` directories: at the root of your project and in each of the modules.
77
-
78
-
### Test with the stable Compose Multiplatform
79
-
80
-
To try the Compose compiler 2.0.0 with the stable version of Compose Multiplatform (1.6.2 or older), use this configuration:
0 commit comments