From 34a0b4374e2c31ff83db9a9e4a7485ca4b124193 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Mon, 17 Aug 2026 00:31:50 +0900 Subject: [PATCH] Pin coroutines 1.9.0 and skip the sample app when publishing `HereMapView.kt` uses the three-argument `CancellableContinuation.resume`, which is the kotlinx-coroutines 1.9 signature. The catalog declared no coroutines version, so a standalone build resolved an older one and failed to compile. The publish task also evaluated `:sample-app`, which needs a `local.defaults.properties` that does not exist on a CI runner. Pass `-PskipSampleApp=true` as the other providers do. --- .github/workflows/publish-maven-central.yml | 2 +- build.gradle.kts | 3 +++ gradle/libs.versions.toml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-maven-central.yml b/.github/workflows/publish-maven-central.yml index b7ea416..1c715de 100644 --- a/.github/workflows/publish-maven-central.yml +++ b/.github/workflows/publish-maven-central.yml @@ -113,7 +113,7 @@ jobs: fi echo " Will publish local version ${local_version} (remote='${remote_version}')." - ./gradlew --no-daemon publishAllPublicationsToCentralPortal + ./gradlew --no-daemon -PskipSampleApp=true publishAllPublicationsToCentralPortal gradle_exit=$? if [[ $gradle_exit -ne 0 ]]; then echo "Gradle publish failed with exit code $gradle_exit" diff --git a/build.gradle.kts b/build.gradle.kts index ce4d0ef..af80bd2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -76,6 +76,9 @@ val libraryArtifactId = "for-here" val libraryVersion = project.findProperty("libraryVersion") as String? ?: "1.0.0" dependencies { + // CancellableContinuation.resume の 3 引数 onCancellation は coroutines 1.9 以降。 + // 明示しないと推移的に古い版が入り、単体ビルドだけがコンパイルエラーになる。 + implementation(libs.kotlinx.coroutines.android) implementation(platform(libs.androidx.compose.bom)) // BOM manages Compose artifact versions. implementation(libs.androidx.ui) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index da5bf57..353e813 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,4 +1,5 @@ [versions] +coroutines = "1.9.0" composeLibs = "1.7.8" agp = "9.2.1" kotlin = "2.0.21" @@ -13,6 +14,7 @@ junitVersion = "1.3.0" espressoCore = "3.7.0" [libraries] +kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" } # Jetpack Compose (with BOM) androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } androidx-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "composeLibs" }