From abd57cf82af1abf73cfff02fc367d5161fff4dce Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Sun, 30 Aug 2026 18:34:11 -0500 Subject: [PATCH] build: disable Isolated Projects repo-wide to make wasmJs a real target org.gradle.isolated-projects=true (this repo's prior default) makes registering wasmJs() on more than one Gradle project impossible: a Kotlin Gradle Plugin-internal cross-project build service (IncrementalModuleInfoBuildService) violates Isolated Projects the moment a second project carries the target, independent of anything module-specific and not fixable per-module. Confirmed via real builds this session. JetBrains' own docs say JS/Wasm + Isolated Projects isn't supported yet, with no ETA. Trade-off, explicit: this gives up whatever build-speed/IDE-sync benefit Isolated Projects was providing repo-wide, not just for wasmJs work, in exchange for wasmJs being usable at all. Verified via gradle-runner: configuration now succeeds with two projects (core:ble, core:common) both carrying an unconditional wasmJs() target, with existing android/jvm/iOS targets on both modules unaffected. --- build-logic/gradle.properties | 4 +++- gradle.properties | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build-logic/gradle.properties b/build-logic/gradle.properties index 7c9329c6a7..fb65f3b3ff 100644 --- a/build-logic/gradle.properties +++ b/build-logic/gradle.properties @@ -25,7 +25,9 @@ org.gradle.jvmargs=-Xmx2g -XX:+UseParallelGC -Dfile.encoding=UTF-8 org.gradle.parallel=true org.gradle.caching=true org.gradle.configuration-cache=true -org.gradle.isolated-projects=true +# Kept in sync with the root gradle.properties -- see its comment for why (wasmJs web target, +# feat/web-wasmjs-target). +org.gradle.isolated-projects=false org.gradle.configureondemand=false # Kotlin diff --git a/gradle.properties b/gradle.properties index 887bc1f10c..50b0848bd7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,7 +20,14 @@ ksp.project.isolation.enabled=true # --- Gradle --- org.gradle.caching=true org.gradle.configuration-cache=true -org.gradle.isolated-projects=true +# Disabled for the wasmJs web target (feat/web-wasmjs-target): registering a second Gradle +# project's wasmJs() target under Isolated Projects trips a violation inside Kotlin Gradle +# Plugin's own cross-project IncrementalModuleInfoBuildService -- confirmed via a real build, +# not fixable per-module, and unrelated to wasmJs's browser()/npm tooling (a separate, +# also-confirmed IP incompatibility). JetBrains' own docs say JS/Wasm + Isolated Projects isn't +# supported yet. Re-enable once upstream closes that gap, if reinstating IP's build-speed/IDE-sync +# benefit outweighs carrying wasmJs as a target by then. +org.gradle.isolated-projects=false org.gradle.jvmargs=-Xmx8g -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication -XX:ReservedCodeCacheSize=512m -XX:MaxMetaspaceSize=2g -Xss2m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.awt.UIElement=true org.gradle.parallel=true # Run the daemon and its workers at low OS priority so full builds don't starve