https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

Ali Khaleqi Yekta

07/28/2022, 5:45 AM
I'm trying to use ComposeUI Multiplatform with Kotlin
1.7.10
, but the latest version uses
1.7.0
. Is there a way to achieve this? I heard about setting the compiler version for Jetpack Compose, I don't know if it is applicable to JB Compose.
p

Priyanshu Jain

07/28/2022, 5:49 AM
Based on what I understood, you can navigate to the build.gradle.kts file which is present at the project level and can configure the kotlin version by changing the version number of kotlin-gradle-plugin
a

Ali Khaleqi Yekta

07/28/2022, 6:01 AM
@Priyanshu Jain I don't want to downgrade Kotlin or gradle plugin versions; This affects the whole project. I'd like to somehow set the Compose compiler version like the way it's done on Jetpack Compose which is:
Copy code
android {
    composeOptions {
        kotlinCompilerExtensionVersion = ...
    }
}
p

Priyanshu Jain

07/28/2022, 6:05 AM
You can change that in the build.gradle.kts file of the android app.
a

Arkadii Ivanov

07/28/2022, 6:10 AM
There is a way to substitute the compiler plugin - https://github.com/JetBrains/compose-jb/issues/2108 You can find a proper version here - https://androidx.dev/storage/compose-compiler/repository
a

Ali Khaleqi Yekta

07/28/2022, 6:42 AM
@Arkadii Ivanov This is exactly what I was looking for. It worked. Thanks! (Besides this, thanks for Decompose!)
@Arkadii Ivanov p.s. About the version, I found http://mvnrepository.com/artifact/androidx.compose.compiler/compiler to be more up-to-date.
a

Arkadii Ivanov

07/28/2022, 7:27 AM
But it doesn't contain dev builds of the compiler, which could be necessary. Dev versions appear faster than releases.
j

jw

07/28/2022, 12:59 PM
You can also temporarily disable the the check as the compiler API between 1.7.0 and 1.7.10 is binary compatible