JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.99k stars 1.16k forks source link

Can't build with compose 1.6.10 and kotlin 2.0.0 #4914

Closed dhakehurst closed 3 months ago

dhakehurst commented 3 months ago

Error

Execution failed for task ':myproject:transformCommonMainDependenciesMetadata'.
> Could not resolve all files for configuration ':myproject:commonMainResolvableDependenciesMetadata'.
   > Could not find androidx.arch.core:core-common:2.2.0.
     Required by:
         project :myproject > org.jetbrains.androidx.lifecycle:lifecycle-runtime:2.8.0
StefanLobbenmeier commented 3 months ago

Could you share your build.gradle.kts? In particular do you have the repositories configured?

I have those and it works on my machine:

repositories {
    mavenCentral()
    maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
    google()
}
dhakehurst commented 3 months ago

Hi, I do not have the maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") repository.

but why should I need it when everything else seems to be on maven central ? and I'm not using a 'dev' version! I did not have this repo when I used the previous version - I'm upgrading from 1.6.0 (beta01)

dhakehurst commented 3 months ago

relevant parts of build.gradle.kts

plugins {
    kotlin("multiplatform") version ("2.0.0") 
    id("org.jetbrains.compose") version "1.6.10" 
    id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" 
...
 repositories {
        mavenCentral()
 }
...

The whole project is available here [https://github.com/dhakehurst/net.akehurst.kotlin.compose.code-editor]
eymar commented 3 months ago

Please try to add google() in the repositories block.

dhakehurst commented 3 months ago

Thanks, That fixed this issue. Didn't need it for previous version.

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.