fix(desktop): pin Compose packaging javaHome to the JBR toolchain (#6213)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
James Rich
2026-07-10 20:21:11 -05:00
committed by GitHub
parent c95e7c7919
commit 5b0db4d4c2
2 changed files with 22 additions and 1 deletions

View File

@@ -546,7 +546,10 @@ jobs:
install_jetbrains_jdk: 'true'
- name: Build Desktop
run: ./gradlew :desktopApp:createDistributable -Pci=true
# proguardReleaseJars is included because it is otherwise only exercised by the
# release workflow: jlink tolerates a jmods-less JDK (JEP 493) but ProGuard does
# not, so a broken packaging JDK would surface at release time instead of here.
run: ./gradlew :desktopApp:createDistributable :desktopApp:proguardReleaseJars -Pci=true
- name: Upload Desktop artifact
if: ${{ inputs.upload_artifacts }}

View File

@@ -109,6 +109,24 @@ compose.desktop {
application {
mainClass = "org.meshtastic.desktop.MainKt"
// CMP resolves javaHome from the JVM running Gradle, not the Kotlin toolchain. On CI
// that's Temurin 25, which ships without jmods (JEP 493): jlink still works, but the
// ProGuard task derives -libraryjars from $javaHome/jmods and fails with ~857k
// unresolved java.* references. Pin packaging to the JBR SDK toolchain (jmods
// included) so ProGuard sees the platform classes and the bundled runtime is
// deterministically JBR 25 on every machine.
javaHome =
javaToolchains
.launcherFor {
languageVersion.set(JavaLanguageVersion.of(25))
vendor.set(JvmVendorSpec.JETBRAINS)
}
.get()
.metadata
.installationPath
.asFile
.absolutePath
val desktopJvmArgs =
listOf(
"-Xmx2G",