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
16.17k stars 1.18k forks source link

ModuleVersionNotFoundException: Could not find org.jetbrains.compose.compiler:compiler:1.2.0-alpha01-dev741. #2173

Closed strange-qwq closed 1 month ago

strange-qwq commented 2 years ago

Sorry I don't speak English, the following is from Google Translate. XD

like #2108, When I upgrade the kotlin version of the examples/todoapp-lite project to 1.7.0 and sync the project, gradle throws an error org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.jetbrains.compose.compiler:compiler:1.2.0-alpha01-dev741., but it still outputs BUILD SUCCESSFUL at the end.

setting.gradle.kts:

pluginManagement {
    repositories {
        gradlePluginPortal()
        maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
        google()
        maven { url = uri("https://maven.aliyun.com/nexus/content/groups/public") }
        maven { url = uri("https://maven.aliyun.com/nexus/content/repositories/jcenter") }
        maven { url = uri("https://maven.aliyun.com/nexus/content/repositories/google") }
        maven { url = uri("https://maven.aliyun.com/nexus/content/repositories/gradle-plugin") }
        mavenCentral()
    }

    plugins {
        kotlin("jvm") version "1.7.0"
        kotlin("android") version "1.7.0"
        kotlin("multiplatform") version "1.7.0"
        id("com.android.library") version "7.2.1"
        id("com.android.application") version "7.2.1"
        id("org.jetbrains.compose") version "1.2.0-alpha01-dev741"
    }
}

include(":common", ":android", ":desktop")

build.gradle.kts:

plugins {
    // this is necessary to avoid the plugins to be loaded multiple times
    // in each subproject's classloader
    kotlin("jvm") apply false
    kotlin("multiplatform") apply false
    kotlin("android") apply false
    id("com.android.application") apply false
    id("com.android.library") apply false
    id("org.jetbrains.compose") apply false
}
dima-avdeev-jb commented 2 years ago

@nganh1 Can you please also try to add repositories like in this example: https://github.com/JetBrains/compose-jb/blob/b1fe574a7ec358bcd4438d158b3145a7c26b0f87/experimental/examples/falling-balls-mpp/build.gradle.kts#L28

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.