Skip to content

Add Compose Multiplatform to the workflow-runtime module. - #1564

Open
zach-klippenstein wants to merge 3 commits into
mainfrom
zachklipp/cmp
Open

Add Compose Multiplatform to the workflow-runtime module.#1564
zach-klippenstein wants to merge 3 commits into
mainfrom
zachklipp/cmp

Conversation

@zach-klippenstein

@zach-klippenstein zach-klippenstein commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

This is the first step toward a Compose-based workflow runtime: wiring up Compose Multiplatform (CMP) in workflow-runtime without breaking existing consumers.

What changed

  • Applied the jetbrains.compose and compose.compiler Gradle plugins to workflow-runtime.
  • Added jetbrains.compose.runtime and jetbrains.compose.runtime-saveable as commonMain dependencies so they resolve to the correct platform artifact on each target (Android, JVM desktop, JS, iOS).
  • Removed the Android Compose BOM and direct androidx.compose.ui dependency from androidMain; the CMP plugin now manages those via jetbrains.compose.ui.
  • Registered catalog aliases for the new CMP libraries and plugins.

Key design decision

When the JetBrains Compose plugin is applied to a KMP module, Gradle's variant resolution can become ambiguous for JVM configurations because CMP publishes both Android and desktop variants. To fix this, resolvable-only configurations (i.e. isCanBeResolved && !isCanBeConsumed) are attributed with KotlinPlatformType.jvm so Gradle consistently picks the desktop variant on JVM. Consumable configurations are intentionally excluded to avoid breaking consumers that don't request a platform type (e.g. SwiftPM lockfile tasks).

Side effects

  • Applying the Compose compiler plugin adds $stable fields to @Stable/@Immutable annotated classes; the Android and JVM .api files are updated accordingly.
  • Transitive dependency snapshots updated to reflect CMP 1.9.3 artifacts and the JetBrains lifecycle/savedstate libraries it pulls in. Android Compose runtime downgraded from 1.9.5 → 1.9.4 (the version CMP 1.9.3 bundles).

Testing

Verified that the build and dependency guard baselines pass. No behavioral changes — no new runtime code is introduced yet.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@zach-klippenstein zach-klippenstein added the ai-outer-loop Managed by outer-loop label Aug 19, 2026
@zach-klippenstein

Copy link
Copy Markdown
Collaborator Author

@codex review

Comment posted automatically by outer-loop

The KotlinPlatformType.jvm attribute was being applied to legacy
configurations that are both resolvable and consumable (ktlint,
COMPOSE_SKIKO_JS_WASM_RUNTIME), which advertised them as variants and
made variant selection ambiguous for consuming projects' SwiftPM
lockfile resolution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zach-klippenstein
zach-klippenstein marked this pull request as ready for review August 20, 2026 00:05
@zach-klippenstein
zach-klippenstein requested review from a team as code owners August 20, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-outer-loop Managed by outer-loop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants