Repository navigation
PreCompose - Kotlin 2.0.0 / Compose 1.6.x #337
Replies: 2 comments
|
I will push an update with Kotlin 2.0 and Compose 1.6 support tomorrow, but I'm not sure current 1.5.x version works with Kotlin 2.0. |
|
There is a released version for that combination: PreCompose 1.6.2's own build uses Kotlin 2.0.0 + Compose Multiplatform 1.6.11. One easy-to-miss part of the Kotlin 2.0 migration is the separate Compose compiler Gradle plugin. The repository's sample applies it alongside the Compose Multiplatform plugin: plugins {
kotlin("multiplatform") version "2.0.0"
id("org.jetbrains.compose") version "1.6.11"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
}The compiler plugin version follows Kotlin, not the Compose Multiplatform version. Apply it in each module that compiles Compose code, and keep any PreCompose artifacts you use on the same version: commonMain.dependencies {
implementation("moe.tlaster:precompose:1.6.2")
// If used:
implementation("moe.tlaster:precompose-viewmodel:1.6.2")
implementation("moe.tlaster:precompose-koin:1.6.2")
}This confirms the specific Kotlin 2.0/Compose 1.6 combination in the question; it is not a compatibility guarantee for every newer Kotlin/Compose pair. If it still fails on that combination, the first actual compiler error and target (JVM/iOS/etc.) would help separate a plugin setup problem from a library issue. Sources: 1.6.2 release, version catalog and compiler plugin, sample module. |
Uh oh!
There was an error while loading. Please reload this page.
Hi together,
I get all time compilation errors when I migrated to Kotlin 2.0.0 and Compose 1.6.x. Now I try to figure out which dependency isn't ready.
So, should PreCompose work without any issue?
All reactions