JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.27k stars 1.11k forks source link

CfW: Prevent UnpackSkikoWasmRuntime task execution when it's not needed #4824

Closed eymar closed 1 month ago

eymar commented 1 month ago

Fixes: https://github.com/JetBrains/compose-multiplatform/issues/4823

In https://github.com/JetBrains/compose-multiplatform/pull/4796 we intentionally started to configure the web app for all k/js and k/wasm targets. The configuration involves adding a dependency on skiko-wasm runtime and unpacking it. Some projects don't need skiko-wasm-runtime (like those based on compose.html or just compose.runtime).

Solution: We check if there is a dependency on org.jetbrains.compose.ui libraries (including transitive dependencies). If we find it, then we enable skikoUnpack task. Otherwise it's disabled.

Testing