From 971dd4594708aced75790ca2eac1a4a7b4ffadca Mon Sep 17 00:00:00 2001 From: Kgothatso Ngako Date: Fri, 20 Nov 2026 11:07:44 +0200 Subject: [PATCH] build: the Gradle daemon runs on Java 21 whatever java is on the path (quartz-mls-marmot-update, Phase 1) Magpie, which the next phase brings in, refuses a daemon below 21. The criteria file makes Gradle pick 21 itself (foojay downloads one where none is installed), so a 17 launcher still gets a 21 daemon: checked with JAVA_HOME at 17, jvmTest 1389/1389. No dependency moves in this commit. The file was gitignored since 8de05742, most likely to keep an IDE-generated copy out of the tree; it is now the build's statement of its daemon JVM, so it is tracked. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 1 - README.md | 4 ++++ docs/quartz-mls-marmot-update.md | 14 ++++++++++++-- gradle/gradle-daemon-jvm.properties | 12 ++++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 gradle/gradle-daemon-jvm.properties diff --git a/.gitignore b/.gitignore index 3a464858..425eca8e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ captures !*.xcworkspace/contents.xcworkspacedata **/xcshareddata/WorkspaceSettings.xcsettings node_modules/ -gradle/gradle-daemon-jvm.properties # Signing keys live outside the repository (composeApp/build.gradle.kts, signingConfigs). *.jks *.keystore diff --git a/README.md b/README.md index d0e0138e..d414ad30 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,10 @@ The reasoning behind each of these, including the protocol details and the failu You need JDK 21 and the Android SDK. iOS builds also need Xcode on macOS. +Gradle's daemon has to run on Java 21. [gradle/gradle-daemon-jvm.properties](gradle/gradle-daemon-jvm.properties) +makes Gradle pick it whatever `java` is on the path. In Android Studio, set Settings → Build, +Execution, Deployment → Build Tools → Gradle → Gradle JDK to 21 as well. + Clone with submodules. The app builds against `lightning-kmp-app` as a composite build, and that repository nests its own builds down to `secp256k1-kmp`: diff --git a/docs/quartz-mls-marmot-update.md b/docs/quartz-mls-marmot-update.md index ec40b9f6..108d8e31 100644 --- a/docs/quartz-mls-marmot-update.md +++ b/docs/quartz-mls-marmot-update.md @@ -244,8 +244,8 @@ carry the same manifest hash, so a lock line is per module and a manifest is per - `./gradlew check` is green, and all four audits pass. The submodules had to be initialised, as Phase 0 of marmot-kmp.md found. So did the -gitignored `local.properties` at each of the five composite levels, which a fresh worktree -does not have. Without them, configuring fails with "SDK location not found" from +gitignored `local.properties` at each of the five composite levels, as the README's +Building section says. Without them, configuring fails with "SDK location not found" from `secp256k1-kmp`. ## Phase 1 — Java 21, pinned @@ -260,6 +260,16 @@ developer's build starts. If it bites, it should bite before any dependency has **Check:** `./gradlew --stop`, then `./gradlew :composeApp:jvmTest` with `java` on the path at 17. The daemon comes up on 21 and the suite matches Phase 0's count. +**Built.** `updateDaemonJvm` wrote `toolchainVersion=21` and foojay download URLs for each +OS and architecture. The foojay resolver was already applied in `settings.gradle.kts`, so a +machine with no local 21 gets one downloaded. A machine with one, like this one with +`/usr/lib/jvm/java-21-openjdk-amd64`, uses it. + +With `JAVA_HOME` pointed at 17, `./gradlew --version` reports a 17 launcher and "Daemon JVM: +Compatible with Java 21 … (from gradle/gradle-daemon-jvm.properties)". The suite, rerun from +that launcher, matches Phase 0. The README's Building section says the same for Android +Studio. + ## Phase 2 — the swap, in one commit Everything Magpie needs and nothing else. diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties new file mode 100644 index 00000000..29602f33 --- /dev/null +++ b/gradle/gradle-daemon-jvm.properties @@ -0,0 +1,12 @@ +#This file is generated by updateDaemonJvm +toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e513ff01cf5313fa5dc4e83526344dc5/redirect +toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/7a6047b9a6cc8280a57d97ce33e3eaae/redirect +toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e513ff01cf5313fa5dc4e83526344dc5/redirect +toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/7a6047b9a6cc8280a57d97ce33e3eaae/redirect +toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a41b74af86b4ecab1604e436c144ac4a/redirect +toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/f07d8e67b317cd6e21867a4510624e78/redirect +toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e513ff01cf5313fa5dc4e83526344dc5/redirect +toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/7a6047b9a6cc8280a57d97ce33e3eaae/redirect +toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e0e37f85a97c5f2df685b37b14a25072/redirect +toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/24b75c034bab89dfde162735bcae3b96/redirect +toolchainVersion=21