From 0fccf54462a2476c40357113a8c0f4e2df6dc542 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Wed, 20 May 2026 10:47:33 -0700 Subject: [PATCH] fix(flatpak): route JitPack com.github group to jitpack.io primaryUrl (#5541) --- .agent_memory/session_context.md | 6 ++++++ gradle/flatpak.gradle.kts | 28 +++++++++++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.agent_memory/session_context.md b/.agent_memory/session_context.md index 13e5cfcfc..64cecb317 100644 --- a/.agent_memory/session_context.md +++ b/.agent_memory/session_context.md @@ -3,6 +3,12 @@ # Do NOT edit or remove previous entries — stale state claims cause agent confusion. # Format: ## YYYY-MM-DD — +## 2026-05-20 — Resolved Flatpak jitpack.io dependency download 404s in sandboxed offline builds +- Modified `GenerateFlatpakSourcesTask` in `gradle/flatpak.gradle.kts` to dynamically detect dependency groups starting with `com.github.` (which are hosted on JitPack). +- Configured the generation of `primaryUrl` for these dependencies to resolve directly from `https://jitpack.io` and created custom high-availability fallback lists. +- Verified that compiling the desktopApp and running the flatpak generator task (`./gradlew :desktopApp:assemble :generateFlatpakSourcesFromCache --no-configuration-cache`) successfully produces a valid 10MB `flatpak-sources.json` containing correctly mapped JitPack URLs. +- Ran quality and validation checks: `./gradlew spotlessCheck detekt` (100% SUCCESSFUL with zero issues). + ## 2026-05-20 — Replaced standalone translations landing page with dynamic global header language switcher dropdown - Deleted redundant standalone page `docs/en/translations.md` and updated `docs/README.md` to reflect layout change. - Completely re-engineered `docs/_includes/language_switcher.html` to: diff --git a/gradle/flatpak.gradle.kts b/gradle/flatpak.gradle.kts index 6be63cb9e..b3bb953fd 100644 --- a/gradle/flatpak.gradle.kts +++ b/gradle/flatpak.gradle.kts @@ -62,13 +62,27 @@ abstract class GenerateFlatpakSourcesTask : DefaultTask() { val sha256 = calculateSha256(file) - val primaryUrl = "https://repo.maven.apache.org/maven2/$mavenPath" - val mirrorUrls = listOf( - "https://dl.google.com/dl/android/maven2/$mavenPath", - "https://plugins.gradle.org/m2/$mavenPath", - "https://maven-central.storage-download.googleapis.com/maven2/$mavenPath", - "https://maven.aliyun.com/repository/public/$mavenPath" - ) + val isJitpack = group.startsWith("com.github.") + val primaryUrl = if (isJitpack) { + "https://jitpack.io/$mavenPath" + } else { + "https://repo.maven.apache.org/maven2/$mavenPath" + } + + val mirrorUrls = if (isJitpack) { + listOf( + "https://repo.maven.apache.org/maven2/$mavenPath", + "https://maven-central.storage-download.googleapis.com/maven2/$mavenPath", + "https://maven.aliyun.com/repository/public/$mavenPath" + ) + } else { + listOf( + "https://dl.google.com/dl/android/maven2/$mavenPath", + "https://plugins.gradle.org/m2/$mavenPath", + "https://maven-central.storage-download.googleapis.com/maven2/$mavenPath", + "https://maven.aliyun.com/repository/public/$mavenPath" + ) + } entries.add( mapOf(