Compose Desktop's AbstractProguardTask builds ProGuard's -libraryjars by
walking <javaHome>/jmods and nothing else. Adoptium stopped shipping the
jmods/ directory in JDK 25 archives (verified: 0 jmods entries in both the
linux/x64 and macOS/aarch64 Temurin 25.0.4.1 tarballs, vs 71 for Temurin
17), so on the runners the desktop packaging JDK resolves to
/usr/lib/jvm/temurin-25-jdk-amd64 and ProGuard gets no JDK whatsoever.
Every class then fails to resolve java.lang.Object — 1.3M
"can't find superclass or interface java.lang.Object" warnings, followed by
"Please correct the above warnings first".
This is why the Java 25 toolchain bump broke every release while the
v1.2.0-beta release on the toolchain 17 build kept working, and why a local
build with the JetBrains Runtime (which does ship jmods) succeeded while CI
did not. ProGuard's version was never the cause; 7.10.0 was still kept
because it is what understands this project's Kotlin 2.4 metadata.
Install Zulu 25 (still ships jmods) in the desktop-proguard job and export
it as FROMCHAT_PACKAGING_JDK; setup-java runs before Temurin 17 so JAVA_HOME
stays on 17 for Gradle and the Android build. resolvePackagingJdkHome() now
warns loudly when the JDK it picks has no jmods/, instead of leaving it to
ProGuard's wall of warnings.
The Compose plugin defaults to ProGuard 7.8.0, which cannot process the Java 25
class files produced by jvmToolchain(25): it fails to load the JDK itself and
aborts with thousands of "can't find referenced class java.lang.Class" /
"the configuration refers to the unknown class 'java.lang.String'" warnings,
ending in "Please correct the above warnings first". Every release build has
been failing there since the toolchain bump.
Pin ProGuard 7.10.0 (7.9.0 added Java 25 support; 7.10.0 is the first release
that also understands the Kotlin 2.4 metadata this project compiles against).
Also ignore JOGL's JavaFX bridge. JetBrains Runtime ships jogl.all.jmod in its
jmods directory, which ProGuard loads as a library jar; its classes extend
program-side JavaFX classes, so JBR-based (macOS) builds fail with
"7 instances of library classes depending on program classes". Temurin JDKs
ship no such jmod, so that part is macOS/JBR-only.
Verified locally: :app:desktop:exportReleaseProguardForCi succeeds and exports
app/desktop/build/ci/proguard/.
release.yml already builds Windows x64 and arm64 installers as part of
the full release pipeline; the standalone workflow only produced a
beta-only x64 artifact, never succeeded, and is superseded.
jvmToolchain(25) (f89619a) compiles classes to class file 69, but
resolvePackagingJdkHome() accepted any JDK that shipped jpackage. On Windows
ARM64 the candidate list hardcoded jdk-21-arm64 first and
ensure-windows-arm64-jdk.cmd provisioned Temurin 21; on macOS the first
candidate was Adoptium 17. jpackage then bundled a Java 17/21 runtime and the
installed app died at launch with UnsupportedClassVersionError on the hidden
launcher's stderr (invisible: GUI subsystem, no error dialogs).
CI hit this too: setup-java-gradle installs Temurin 17 and the workflows
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME", which the resolver returned
verbatim — so the x64 installer built by desktop-windows-x64.yml was broken
on launch.
- build.gradle.kts: version-gate FROMCHAT_PACKAGING_JDK / JAVA_HOME /
candidate JDKs to >= desktopJvmTarget (25) with a warning, then fall back to
the Gradle-provisioned toolchain JDK (recursive .gradle/jdks scan).
- ensure-windows-arm64-jdk.cmd: prefer an installed jdk-25* or the
Gradle-provisioned Java 25 toolchain JDK; Temurin 21 remains only the
last-resort daemon JVM.
Ported from c53b54b, minus ensure-windows-x64-jdk.cmd and diag-launch.ps1:
this branch has no packageWindowsX64 path to feed, and diag-launch.ps1 is
machine-specific and unreferenced.
Verified on macOS: createDistributable now bundles JAVA_VERSION 25.0.4.1,
matching class file 69, where a previous build had bundled 17.0.19.
The tray right-click popup took roughly 500ms to appear, then flashed at the
top-left of the display at the wrong size before settling; on HiDPI Windows it
was also pinned to the bottom-right corner of the screen rather than the click.
- Show the popup transiently (Window.opacity = 0) while Compose measures it,
then size, position and reveal it. This removes the open delay without the
off-screen parking trick, which Windows clamps back to (0,0) and paints,
causing the flash at the wrong size.
- Derive the anchor from MouseInfo rather than the TrayIcon event and normalise
it into the graphics configuration's coordinate space. On HiDPI Windows the
event carries raw physical pixels, which landed outside every screen and
pinned the menu to the bottom-right corner.
- Clamp to the monitor's working area (bounds minus taskbar insets) so the menu
is never hidden behind the taskbar.
- Pick the monitor that actually contains the click instead of the one the
unpositioned window happens to sit on.
Cache the entire windows-setup target tree plus ~/.cargo; split restore/save; skip cargo build when all release binaries are present.
Co-authored-by: Cursor <cursoragent@cursor.com>
Save always uses the job scope key; do not reuse cache-primary-key from a partial restore (e.g. Android saving build-jar).
Co-authored-by: Cursor <cursoragent@cursor.com>
Fail early when the release already exists; workflow_dispatch can set force_update_release to overwrite it.
Co-authored-by: Cursor <cursoragent@cursor.com>
Cache project .gradle/ and root build/ (execution history + outputs), restore git mtimes after checkout, skip set-version when unchanged, and bump cache keys to v2 with build-jar restore fallback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use a single glob for platform artifacts and a separate step for Android; multiline pattern values are not supported.
Co-authored-by: Cursor <cursoragent@cursor.com>
download-artifact accepts one glob pattern, not multiline lists; split platform and Android downloads. Scope Gradle build cache keys per job and use read-only setup-gradle on parallel jobs to avoid cache reservation races.
Co-authored-by: Cursor <cursoragent@cursor.com>