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 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-20 11:07:44 +02:00
1 parent 3a1dbf878c
commit 971dd45947
4 files changed
+28 -3

No files matched your search

-1
View File
@@ -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
+4
View File
@@ -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`:
+12 -2
View File
@@ -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.
+12
View File
@@ -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