fix(commons): declare okio so the Apple targets compile after the Compose split

test-quartz-ios failed on :commons:compileKotlinIosSimulatorArm64 with
"Unresolved reference 'okio'" in service/image/DeferredDeleteFileSystem.kt.
The file always used okio, but commons only ever got it transitively:
through Coil on every target, and through OkHttp on JVM. Moving Coil to
:commonsUI removed the only Apple-side provider, and the JVM builds kept
passing, so nothing caught it locally.

Declare okio (3.18.1, the version already resolved everywhere; Apache-2.0
per its POM) in commons commonMain. Reproduced and re-verified on Linux with
:commons:compileCommonMainKotlinMetadata, which resolves commonMain against
the shared-dependency set exactly like the iOS compile. That task, for all
three KMP library modules, is now part of the lint job so this class of gap
fails fast on Linux.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N56KzPSYiN5edMRamvKEgD
This commit is contained in:
Claude
2026-09-13 00:36:31 +00:00
parent 5142c88629
commit 6030d22aa9
3 changed files with 19 additions and 1 deletions
+10 -1
View File
@@ -45,7 +45,16 @@ jobs:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Linter (gradle)
run: ./gradlew spotlessCheck :quartz:verifyKmpPurity :commons:verifyKmpPurity :commonsUI:verifyKmpPurity
# The three metadata compiles resolve commonMain against only the
# deps every target shares, which is the Apple classpath — a
# dependency that reaches JVM transitively (okio via OkHttp) but is
# missing for iOS fails here, on Linux, instead of in test-quartz-ios.
run: |
./gradlew spotlessCheck \
:quartz:verifyKmpPurity :commons:verifyKmpPurity :commonsUI:verifyKmpPurity \
:quartz:compileCommonMainKotlinMetadata \
:commons:compileCommonMainKotlinMetadata \
:commonsUI:compileCommonMainKotlinMetadata
build-desktop:
needs: lint
+7
View File
@@ -83,6 +83,13 @@ kotlin {
// LruCache (KMP-ready)
implementation(libs.androidx.collection)
// okio (KMP, Apache-2.0) for service/image/DeferredDeleteFileSystem,
// the ForwardingFileSystem the apps wrap Coil's disk cache in. It
// used to arrive transitively through Coil; with Coil in
// :commonsUI the Apple targets lost it (JVM still saw it via
// OkHttp), so declare the dependency the file actually has.
implementation(libs.okio)
// Immutable collections
api(libs.kotlinx.collections.immutable)
+2
View File
@@ -59,6 +59,7 @@ lightcompressor-enhanced = "2.2.1"
jlatexmath = "1.5"
markdown = "4d3b3dd173"
highlights = "1.1.0"
okio = "3.18.1"
# JetBrains material3 must track Compose Multiplatform's foundation: CMP 1.12.0 changed
# the CustomStyle.applyStyle signature, so the stable 1.9.0 (and the 1.11.0-alpha07 that
# kodein-emoji pulls in) crash at runtime with AbstractMethodError in OutlinedTextField.
@@ -221,6 +222,7 @@ markdown-commonmark = { group = "com.github.vitorpamplona.compose-richtext", nam
markdown-ui = { group = "com.github.vitorpamplona.compose-richtext", name = "richtext-ui", version.ref = "markdown" }
markdown-ui-material3 = { group = "com.github.vitorpamplona.compose-richtext", name = "richtext-ui-material3", version.ref = "markdown" }
highlights = { group = "dev.snipme", name = "highlights", version.ref = "highlights" }
okio = { group = "com.squareup.okio", name = "okio", version.ref = "okio" }
mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" }
mockk-android = { group = "io.mockk", name = "mockk-android", version.ref = "mockk" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines-test"}