mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-07-11 22:06:23 -04:00
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:
5
.github/workflows/reusable-check.yml
vendored
5
.github/workflows/reusable-check.yml
vendored
@@ -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 }}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user