Skip to content

Commit 94c1b05

Browse files
committed
Resolve the errors such as Unresolved reference 'jvm' by downgrading Kotlin to 2.2.10
See https://youtrack.jetbrains.com/issue/KT-78255/Gradle-KMP-compileCommonMainKotlinMetadata-fails-with-composite-builds for the cause and solutions.
1 parent cdf9c13 commit 94c1b05

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

buildSrc/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ repositories {
1010
}
1111

1212
dependencies {
13-
val kotlinVersion = "2.2.20"
13+
val kotlinVersion = "2.2.10"
1414
implementation(kotlin("gradle-plugin", kotlinVersion))
1515
implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion")
1616
implementation("org.jetbrains.compose:compose-gradle-plugin:1.9.0")
17-
implementation("com.huanshankeji.team:gradle-plugins:0.10.0-SNAPSHOT") // TODO don't use a snapshot version in a main branch
17+
implementation("com.huanshankeji.team:gradle-plugins:0.10.0-SNAPSHOT") { exclude("org.jetbrains.kotlin") } // TODO don't use a snapshot version in a main branch
1818
implementation("com.android.tools.build:gradle:8.12.3")
19-
implementation("com.huanshankeji:common-gradle-dependencies:0.10.0-20250918-SNAPSHOT") // TODO don't use a snapshot version in a main branch
19+
implementation("com.huanshankeji:common-gradle-dependencies:0.10.0-20250918-SNAPSHOT") { exclude("org.jetbrains.kotlin") } // TODO don't use a snapshot version in a main branch
2020
}

common/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ kotlin {
5454
dependencies {
5555
api(compose.html.core)
5656
// see: https://github.com/varabyte/kobweb/blob/main/frontend/kobweb-compose/build.gradle.kts
57-
api("com.varabyte.kobweb:kobweb-compose:${DependencyVersions.kobweb}")
58-
implementation("com.huanshankeji:compose-html-common:${DependencyVersions.huanshankejiComposeHtml}")
57+
api("com.varabyte.kobweb:kobweb-compose:${DependencyVersions.kobweb}") { exclude("org.jetbrains.kotlin") }
58+
implementation("com.huanshankeji:compose-html-common:${DependencyVersions.huanshankejiComposeHtml}") { exclude("org.jetbrains.kotlin") }
5959

6060
/*
6161
The UI module depends on the lifecycle module to use `androidx.lifecycle.ViewModelStoreOwner`.

0 commit comments

Comments
 (0)