Javier
07/19/2022, 1:35 PM1.2.0-alpha01-dev748
is failing with
This version (1.2.0) of the Compose Compiler requires Kotlin version 1.7.0 but you appear to be using Kotlin version 1.7.10 which is not known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
Meanwhile 1.2.0-alpha01-dev745
is working correctly 🤔Arkadii Ivanov
07/19/2022, 1:37 PMKirill Grouchnikov
07/19/2022, 1:37 PMJavier
07/19/2022, 1:39 PMjim
07/19/2022, 4:34 PMJavier
07/19/2022, 4:41 PMArkadii Ivanov
07/19/2022, 5:05 PMjim
07/19/2022, 5:06 PMArkadii Ivanov
07/19/2022, 5:08 PMjim
07/19/2022, 5:12 PMArkadii Ivanov
07/19/2022, 5:13 PMjim
07/19/2022, 5:15 PMallprojects {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("org.jetbrains.compose.compiler:compiler")).apply {
using(module("androidx.compose.compiler:compiler:1.2.1-dev-k1.7.10-27cf0868d10"))
}
}
}
}
And adding the repository as per https://github.com/jimgoog/ComposeAppUsingPrereleaseComposeCompiler/blob/main/settings.gradle#L17Arkadii Ivanov
07/19/2022, 5:18 PMjim
07/19/2022, 5:19 PMArkadii Ivanov
07/19/2022, 5:19 PMjim
07/19/2022, 5:22 PMArkadii Ivanov
07/19/2022, 5:25 PMJavier
07/19/2022, 5:25 PMjim
07/19/2022, 5:28 PMTBH, there was an NPE error during Gradle sync with Compose for Desktop, it was fixed later with a release officially compatible with Kotlin 1.7.0. (edited)Compose Compiler versions are not expected to be compatible with any version of the Kotlin Compiler except that with which they were built/documented to support. The Kotlin-stdlib is stable, so Compose libraries compiled against the old kotlin-stdlib should work with newer kotlin-stdlibs.
that plus AGP integrated into KGP KMP plugin would be a nice 2022 for KMPYeah, something like that. We're looking at what it would take to unify the configurations too.
Arkadii Ivanov
07/19/2022, 5:32 PMCompose Compiler versions are not expected to be compatible with any version of the Kotlin Compiler except that with which they were built/documented to support. The Kotlin-stdlib is stable, so Compose libraries compiled against the old kotlin-stdlib should work with newer kotlin-stdlibs.
Of course. I was upgrading from Kotlin 1.6.10 to Kotlin 1.7.0, there was a dev build of the Jetpack Compose compiler for Kotlin 1.7.0. I bumped the Kotlin version to 1.7.0, and used the trick to substitute the Compose compiler for Kotlin 1.7.0, while keeping all Compose artifacts of version 1.1.1, and Gradle sync was failing with NPE.
I am using Compose with Kotlin 1.7.0 and it's working great. You need to use the latest build 1.2.0-alpha01-dev709. And for the compose compiler you need to use version 1.2.0-dev-k1.7.0-53370d83bb1 from here: https://androidx.dev/storage/compose-compiler/repository
I remember, I also had to bump the Compose version from the stable 1.1.1 to the latest 1.2.0-alpha to make everything working.