diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44582700a4..7665ea2bb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/commons/build.gradle.kts b/commons/build.gradle.kts index 7e8b0dda6c..b952fe67af 100644 --- a/commons/build.gradle.kts +++ b/commons/build.gradle.kts @@ -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) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 266e447dd3..bde3c56b33 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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"}