Skip to content

feat(flatpak): reconstruct standard maven filenames from local Gradle cache#5538

Merged
jamesarich merged 1 commit into
meshtastic:mainfrom
jamesarich:fix/flatpak-sources-automation
May 20, 2026
Merged

feat(flatpak): reconstruct standard maven filenames from local Gradle cache#5538
jamesarich merged 1 commit into
meshtastic:mainfrom
jamesarich:fix/flatpak-sources-automation

Conversation

@jamesarich

@jamesarich jamesarich commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Overview

This PR builds on top of the native Flatpak cache scanner (#5533) by introducing standard Maven filename reconstruction to prevent 404 download errors on non-standard cached files (such as animation.aar).


🛠️ Detailed Changes

Standard Maven Filename Reconstruction

  • Problem: When walking the local Gradle cache (~/.gradle/caches/modules-2/files-2.1), we occasionally encounter artifacts cached with a simplified filename that doesn't include the standard maven artifact coordinate metadata (for example, animation.aar instead of animation-android-1.10.0.aar). In the Flathub sandbox build environment, attempting to download directly using the non-standard filename results in a 404 error from public repositories (such as Google Maven or Maven Central) because the remote servers only recognize the fully qualified coordinate-based filename.
  • Solution: Implemented reconstruction logic in GenerateFlatpakSourcesTask:
    • Verifies whether the cached filename starts with the standard Maven $name-$version pattern.
    • If not, it automatically reconstructs the filename to match standard repository naming conventions ($name-$version.$ext).
    • Uses the reconstructed standard filename (serverFilename) for both the remote URL path construction and the final dest-filename mapping.

🧪 Verification & Results

Spotless & Detekt Compliance

All project formatting and static analysis checks pass cleanly without a single lint regression:

./gradlew spotlessCheck detekt

Result: BUILD SUCCESSFUL (100% clean passes).

@github-actions github-actions Bot added bugfix PR tag enhancement New feature or request labels May 20, 2026
@jamesarich jamesarich force-pushed the fix/flatpak-sources-automation branch from c2ca2a3 to 69f73a0 Compare May 20, 2026 17:18
@jamesarich jamesarich changed the title feat(flatpak): add dynamic only-arches and standard filename reconstruction feat(flatpak): reconstruct standard maven filenames from local Gradle cache May 20, 2026
@jamesarich jamesarich merged commit 32df44f into meshtastic:main May 20, 2026
9 checks passed
@jamesarich jamesarich deleted the fix/flatpak-sources-automation branch May 20, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant