mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-09-19 10:09:17 -04:00
109 lines
5.7 KiB
YAML
109 lines
5.7 KiB
YAML
# Local offline verification of org.meshtastic.MeshtasticDesktop.
|
|
# Differences from the official Flathub manifest (flathub/org.meshtastic.MeshtasticDesktop):
|
|
# 1. Meshtastic-Android source: `type: dir` pointing at our local checkout instead of `type: git`.
|
|
# 2. flatpak-sources.json is INCLUDED (uncommented) so Gradle resolves from the offline-repository.
|
|
# 3. Build uses `--offline` for Gradle — true Flathub-style offline compilation.
|
|
# (finish-args still grants runtime network since the app needs it; only the build is offline.)
|
|
# Generated by scripts/verify-flatpak/verify.sh; do not edit upstream from here.
|
|
|
|
id: org.meshtastic.MeshtasticDesktop
|
|
runtime: org.freedesktop.Platform
|
|
runtime-version: '25.08'
|
|
sdk: org.freedesktop.Sdk
|
|
sdk-extensions:
|
|
# Single JDK: openjdk25 runs the Gradle daemon (gradle/gradle-daemon-jvm.properties pins
|
|
# toolchainVersion=25) and satisfies every module's jvmToolchain (25). The offline build
|
|
# disables toolchain auto-provisioning, so bumping either pin means updating this extension
|
|
# and the /usr/lib/sdk/openjdk* paths below — a miss fails at daemon startup or compileJava.
|
|
- org.freedesktop.Sdk.Extension.openjdk25
|
|
command: meshtastic-wrapper.sh
|
|
|
|
finish-args:
|
|
- --share=ipc
|
|
- --socket=x11
|
|
- --device=dri
|
|
- --device=all
|
|
- --share=network
|
|
- --talk-name=org.kde.StatusNotifierWatcher
|
|
- --talk-name=org.freedesktop.Notifications
|
|
- --allow=bluetooth
|
|
- --system-talk-name=org.bluez.*
|
|
- --env=PATH=/app/jre/bin:/app/bin:/usr/bin
|
|
- --env=JAVA_HOME=/app/jre
|
|
|
|
modules:
|
|
- name: jbr
|
|
buildsystem: simple
|
|
build-commands:
|
|
- mkdir -p /app/jre
|
|
- tar xzf jbr-*.tar.gz -C /app/jre --strip-components=1
|
|
sources:
|
|
- type: file
|
|
url: https://cache-redirector.jetbrains.com/intellij-jbr/jbr-25.0.3-linux-x64-b508.16.tar.gz
|
|
sha512: f936d2a4048485d3cb552c26f69b41f13eba0f75de1178c9ff6185547755c336d0ef5af9641f004e916d0d0414e34d1e9f9d12c08d262038cbca517dcad0dc96
|
|
only-arches:
|
|
- x86_64
|
|
- type: file
|
|
url: https://cache-redirector.jetbrains.com/intellij-jbr/jbr-25.0.3-linux-aarch64-b508.16.tar.gz
|
|
sha512: 038cce6e7e2d68a28c1b269aff199c2e8a4bca58e24d27f9345fbb6031d6b6dc82d79d524586f3e96952d0272d2ca02fa84817df69b4f6052e9f2c5d34c02bad
|
|
only-arches:
|
|
- aarch64
|
|
|
|
- name: meshtastic-wrapper
|
|
buildsystem: simple
|
|
build-commands:
|
|
- install -Dm755 meshtastic-wrapper.sh /app/bin/meshtastic-wrapper.sh
|
|
sources:
|
|
- type: file
|
|
path: meshtastic-wrapper.sh
|
|
|
|
- name: meshtastic-desktop
|
|
buildsystem: simple
|
|
build-options:
|
|
append-path: "/usr/lib/sdk/openjdk25/bin"
|
|
env:
|
|
JAVA_HOME: /usr/lib/sdk/openjdk25/jvm/openjdk-25
|
|
# Point Gradle at the offline mirror produced by flatpak-sources.json
|
|
GRADLE_USER_HOME: /run/build/meshtastic-desktop/.gradle
|
|
build-commands:
|
|
# Install desktop metadata from the in-repo packaging sources (mirrors the upstream Flathub manifest,
|
|
# which stopped shipping standalone root-level copies as of 2026-05-30).
|
|
- install -Dm644 desktopApp/packaging/icons/icon.svg /app/share/icons/hicolor/scalable/apps/org.meshtastic.MeshtasticDesktop.svg
|
|
- install -Dm644 -t /app/share/applications desktopApp/packaging/linux/org.meshtastic.MeshtasticDesktop.desktop
|
|
- desktop-file-edit --set-key="Exec" --set-value="meshtastic-wrapper.sh %U"
|
|
/app/share/applications/org.meshtastic.MeshtasticDesktop.desktop
|
|
- install -Dm644 -t /app/share/metainfo desktopApp/packaging/linux/org.meshtastic.MeshtasticDesktop.metainfo.xml
|
|
# Point the wrapper at the bundled zip. distributionSha256Sum stays — the vendored
|
|
# zip is the identical -bin artifact, so wrapper verification still passes.
|
|
- sed -i 's|distributionUrl=.*|distributionUrl=gradle-bin.zip|' gradle/wrapper/gradle-wrapper.properties
|
|
- echo "org.gradle.java.installations.auto-detect=false" >> gradle.properties
|
|
- echo "org.gradle.java.installations.auto-download=false" >> gradle.properties
|
|
- echo "org.gradle.java.installations.paths=/usr/lib/sdk/openjdk25/jvm/openjdk-25" >> gradle.properties
|
|
- >
|
|
sed -i
|
|
's/^\(\s*\)vendor\.set(JvmVendorSpec\.JETBRAINS)/\1\/\/ vendor.set(JvmVendorSpec.JETBRAINS)/'
|
|
desktopApp/build.gradle.kts
|
|
# Force Gradle to resolve from the bundled offline-repository ONLY (true offline test).
|
|
# -Pdesktop.release=true: shipped builds must have IS_DEBUG=false (no debug HTTP
|
|
# logging, enables the in-app update check). Mirror this in the upstream Flathub manifest.
|
|
- ./gradlew --offline -Pdesktop.release=true :desktopApp:packageUberJarForCurrentOS
|
|
- >
|
|
JAR_FILE=$(find desktopApp/build/compose/jars/ -name "*.jar" -type f | head -1)
|
|
&& install -Dm755 "$JAR_FILE" /app/lib/meshtastic-desktop.jar
|
|
sources:
|
|
# Desktop metadata (.desktop/.metainfo.xml/.svg) now lives inside the meshtastic-android
|
|
# source tree (desktopApp/packaging/...) and is installed by build-commands above —
|
|
# no longer sourced as standalone root-level files.
|
|
- type: dir
|
|
path: meshtastic-android
|
|
- type: file
|
|
# Must be the EXACT distribution from gradle-wrapper.properties (version AND -bin
|
|
# flavor); distributionSha256Sum verifies this file. Renovate bumps the version here
|
|
# alongside wrapper bumps (custom manager in renovate.json) but the sha256 must be
|
|
# copied from distributionSha256Sum by hand; CI fails fast on any mismatch.
|
|
url: https://services.gradle.org/distributions/gradle-9.6.1-bin.zip
|
|
sha256: 9c0f7faeeb306cb14e4279a3e084ca6b596894089a0638e68a07c945a32c9e14
|
|
dest: "gradle/wrapper"
|
|
dest-filename: "gradle-bin.zip"
|
|
- flatpak-sources.json
|