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
Build the gradle plugin locally (with this change)
Run ./gradlew jsBrowserDistribution, check .../compose-multiplatform/examples/html/landing/build/dist/js/productionExecutable and see NO skiko.* files added there
Then add implementation(compose.foundation) dependency in build.gradle.jts and run ./gradlew clean jsBrowserDistribution again - the build/dist contains skiko.* now
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
./gradlew jsBrowserDistribution
, check.../compose-multiplatform/examples/html/landing/build/dist/js/productionExecutable
and see NO skiko.* files added thereimplementation(compose.foundation)
dependency in build.gradle.jts and run./gradlew clean jsBrowserDistribution
again - the build/dist contains skiko.* now