Skip to content

build: target Compose Multiplatform 1.12.0-rc01 - #428

Open
kdroidFilter wants to merge 1 commit into
masterfrom
chore/compose-1.12
Open

build: target Compose Multiplatform 1.12.0-rc01#428
kdroidFilter wants to merge 1 commit into
masterfrom
chore/compose-1.12

Conversation

@kdroidFilter

Copy link
Copy Markdown
Collaborator

Why

Apps running Compose Multiplatform 1.12 crash on the current artifacts:

java.lang.NoSuchMethodError: 'org.jetbrains.skia.Data org.jetbrains.skia.Image.encodeToData$default(
    org.jetbrains.skia.Image, org.jetbrains.skia.EncodedImageFormat, int, int, java.lang.Object)'
    at ComposableIconUtils.renderComposableToPngBytes(ComposableIconUtils.kt:101)

Skiko 0.150.1 (shipped with Compose 1.12) added a pngCompressionLevel parameter to
Image.encodeToData, so the synthetic $default bridge we were compiled against no longer exists.
The call site is source-compatible (all extra params have defaults) — only a recompile against 1.12
is needed.

Change

  • compose 1.11.1 → 1.12.0-rc01 (skiko 0.150.1)

No source changes were required in composenativetray or composenativetray-app.

Verified

  • ./gradlew build (compile + tests + ktlint + detekt) green on both modules
  • :demo:compileKotlinJvm green
  • Tray icon rendering (the failing Skia path) runs fine at runtime against skiko 0.150.1

Note

Downstream, nucleus.decorated-window-tao 2.4.4 is still compiled against Compose 1.11 and fails
with a matching NoSuchMethodError on CanvasLayersComposeScene, so a Nucleus release built
against 1.12 is required before the demo/TrayApp path works end to end. Nothing to fix here.

When 1.12.0 stable ships, this is a one-line version bump.

Skiko 0.150.1 changed Image.encodeToData to take an extra pngCompressionLevel
parameter, so the 1.11-compiled artifacts fail at runtime with NoSuchMethodError
on apps running Compose 1.12. Source stays compatible; only a recompile against
1.12 is required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant