Skip to content

fix: Skiko 1.12 encodeToData breakage + update Compose/Nucleus - #428

Merged
kdroidFilter merged 3 commits into
masterfrom
chore/compose-1.12
Aug 27, 2026
Merged

fix: Skiko 1.12 encodeToData breakage + update Compose/Nucleus#428
kdroidFilter merged 3 commits into
masterfrom
chore/compose-1.12

Conversation

@kdroidFilter

@kdroidFilter kdroidFilter commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Why

Apps running Compose Multiplatform 1.12 crash on the current artifacts (NucleusFramework/Nucleus#594):

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 compiled against an older Skiko no
longer exists — and vice versa: an artifact compiled against 0.150.1 would break the same way on
older runtimes.

Change

  • compose 1.11.1 → 1.12.0 stable (skiko 0.150.1)
  • nucleus / nucleus-plugin 2.4.4 → 2.5.0 (built against Compose 1.12)
  • ComposableIconUtils: PNG encoding now catches NoSuchMethodError and falls back to the
    legacy two-argument encodeToData(format, quality) overload via reflection, so the artifact
    tolerates Skiko signature drift in both directions instead of being pinned to the exact Skiko
    it was compiled against.

Verified

  • ./gradlew compileKotlinJvm jvmTest ktlintCheck detekt green
  • Tray icon rendering (the failing Skia path) runs fine at runtime against skiko 0.150.1

Fixes NucleusFramework/Nucleus#594

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.
Recompiling against Compose 1.12.0 (Skiko 0.150.1) fixes the
NoSuchMethodError on Image.encodeToData reported in
NucleusFramework/Nucleus#594.
Skiko 0.150 (Compose 1.12) added a pngCompressionLevel parameter to
Image.encodeToData, breaking the synthetic $default bridge across
versions in both directions. Fall back to the legacy two-argument
overload via reflection when the direct call throws NoSuchMethodError,
so the published artifact keeps working on older Skiko runtimes.

Fixes NucleusFramework/Nucleus#594
@kdroidFilter kdroidFilter changed the title build: target Compose Multiplatform 1.12.0-rc01 fix: Skiko 1.12 encodeToData breakage + update Compose/Nucleus Aug 27, 2026
@kdroidFilter
kdroidFilter merged commit ab913ae into master Aug 27, 2026
4 checks passed
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.

Nuclues 2.5.0 Tray menu throws exception on Win11

1 participant