Trying to migrate a project from 1.8 kotlin and 1....
# compose
v
Trying to migrate a project from 1.8 kotlin and 1.4 compose to 1.9.10 + 1.5.3. Stack with build failing to find compose runtime 1.5.0. I think I manually checked all the 3rd party libs version and updated them. How do I know what exactly and why trying to load 1.5.0 runtime?
v
./gradlew dependencies
?
v
Copy code
Execution failed for task ':buildSrc:compileKotlin'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':buildSrc:compileKotlin'.
   > Failed to calculate the value of property 'jvmTarget'.
      > Unknown Kotlin JVM target: 20
I tried
v
You get that for running the dependencies task?
v
Yes
I wonder if having my own "buildSrc" module with my Deps.kt for dependencies list/versions can anyhow be breaking my migration. Because everything else seems to be similar with what I can see in the projects which build
I have added
Copy code
kotlin {
    jvmToolchain(11)
}
for the build.gradle for the buildSrc module and managed to run
./gradlew dependencies
a
Are you sure you're using your own compose version def? IIRC multiplatform had some weirdness where some other thing contributes "bundled" compose.
v
And how would I ensure that?
I have that in settings.gradle and I am positive that
Copy code
extra["compose.version"]
is 1.5.3.
a
https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.5.3 Compose compiler is 1.5.3, but everything else is 1.5.0
v
I don't use explicit versions for other stuff.
Copy code
with (compose) {
    implementation(runtime)
    implementation(foundation)
    implementation(material3)
    @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
    implementation(components.resources)
}
So probably shouldn't be affected?
a
Yep when you do that you take what the plugin contributes I believe, which is what I tried saying earlier
v
I think I am missing some library which I didn't update or something. Or having my buildSrc module somehow breaks everything
So you saying that I should rather add those dependencies manually?
a
See if invalidating cache helps? Your stack trace could be because of something else otherwise.
v
But the thing is, that the android+ios jetbrains template also does that, and it works for it
Oh I invalidate it after every step 😄
I think I managed to move for that error state, but not sure how. Firstly I added
Copy code
kotlin {
    jvmToolchain(11)
}
that enabled
./gradlew dependencies
(Thanks Alias). Then playing with
./gradlew shared:dependencies
I found that I use some weird dependencies. One of them was low version and there was update to one with 1.9 kotlin support. And activityCompose dependency was too high and conflicting with my buildSdk 33. Now I am past of the initial errors, and dealing with others, not related to compose.