Conversation
- Introduce Flatpak build configuration including manifest (`.yml`), AppStream metainfo, and desktop entry. - Add a specialized shell script `disable-android-for-flatpak.sh` to strip Android-specific plugins and configurations in-place, enabling builds in SDK-restricted environments. - Implement a launcher script to execute the application using a bundled JetBrains Runtime (JBR) for optimal Compose Desktop performance. - Patch Gradle convention plugins to provide no-op implementations for Android targets during the Flatpak build process. - Configure Flatpak sandbox permissions for network access, X11/Wayland display, and XDG download directory integration.
- Add `flatpak-sources.json` containing a comprehensive list of offline Maven/Gradle dependencies for Flatpak builds. - Configure `flatpak-gradle-generator` plugin in `build.gradle.kts` to automate source manifest generation. - Update Flatpak manifest (`zed.rainxch.githubstore.yml`) and metainfo with correct SHA-256 hashes for JBR and Gradle distributions. - Update project URLs and VCS references from `AshkanAhmady/GitHub-Store` to `OpenHub-Store/GitHub-Store`.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds Flatpak packaging for GitHub Store: plugin and task to produce flatpak sources, scripts and manifest to build a Flatpak (including bundling JBR and disabling Android targets), a runtime launcher, desktop entry, and AppStream metadata. Changes
Sequence Diagram(s)sequenceDiagram
participant Builder as Flatpak Builder
participant Repo as Source Repository
participant Script as disable-android-for-flatpak.sh
participant Gradle as Gradle (offline)
participant JBR as JBR extraction
participant Installer as Flatpak Install Step
Builder->>Repo: fetch sources (repo tag, gradle zip, flatpak-sources.json)
Builder->>Script: run disable-android-for-flatpak.sh
Script->>Repo: patch Kotlin/Gradle convention sources and remove android blocks
Builder->>Gradle: run offline build to produce uber JAR
Gradle->>JBR: extract/place JBR into /app/jre (jbr module)
Gradle->>Installer: output `/app/lib/githubstore.jar`, launcher, assets
Installer->>Builder: install desktop file, metainfo, icon, launcher into /app
Builder->>Builder: finalize Flatpak bundle
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packaging/flatpak/disable-android-for-flatpak.sh`:
- Around line 100-106: The sed replacement for configureAndroidTarget() is
matching the function declaration and breaking Kotlin; modify the loop to skip
files that contain the declaration (e.g., grep -q "fun
Project.configureAndroidTarget" "$f" && continue) before running sed so only
call sites are rewritten, and apply the same guard for configureKotlinAndroid by
checking for its declaration (e.g., grep -q "fun Project.configureKotlinAndroid"
"$f" && continue) to avoid touching function definitions; keep the sed
replacement only for true call-site files (or alternatively restrict the loop to
known call-site filenames) so configureAndroidTarget() and
configureKotlinAndroid(this) are commented out only where they are invoked.
In `@packaging/flatpak/zed.rainxch.githubstore.metainfo.xml`:
- Line 33: The AppStream screenshot URL in the <image> element still points to
the old owner "AshkanAhmady"; update the URL value to use the current repository
owner "OpenHub-Store" (i.e., replace "AshkanAhmady" with "OpenHub-Store" in the
image URL) so the screenshot path matches the rest of the metadata and renders
correctly.
In `@packaging/flatpak/zed.rainxch.githubstore.yml`:
- Around line 34-40: The two sha256 entries currently use the same checksum for
different JBR archives (the url values jbr_jcef-21.0.7-linux-x64-... and
jbr_jcef-21.0.7-linux-aarch64-...); replace each duplicated sha256 value with
the correct SHA-256 for its corresponding URL by downloading or fetching the
artifact and computing its checksum (or retrieving the vendor-provided checksum)
and update the sha256 fields so the linux-x64 and linux-aarch64 entries each
have their distinct, correct hash.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b3f7c91e-b4c9-473c-a648-7c7e57c84ee4
📒 Files selected for processing (7)
build.gradle.ktspackaging/flatpak/disable-android-for-flatpak.shpackaging/flatpak/flatpak-sources.jsonpackaging/flatpak/githubstore.shpackaging/flatpak/zed.rainxch.githubstore.desktoppackaging/flatpak/zed.rainxch.githubstore.metainfo.xmlpackaging/flatpak/zed.rainxch.githubstore.yml
- Switch JetBrains Runtime (JBR) from the JCEF variant to the plain version (v21.0.10) since the app does not use embedded Chromium. - Update JBR download URLs and SHA-256 hashes for both x86_64 and aarch64 architectures. - Update screenshot URLs in the Flatpak metainfo to point to the new repository location and include high-quality JPG assets. - Add new screenshots showcasing repository details, RPM installation, and AppImage support on Linux. - Update the homepage URL in the metainfo to reflect the current repository owner.
…k script - Update `disable-android-for-flatpak.sh` to skip files that define `configureAndroidTarget` and `configureKotlinAndroid` functions. - Ensure only call sites of these functions are commented out during the Flatpak build preparation. - Use `grep` to identify and exclude function declarations from `sed` modifications to maintain script integrity.
.yml), AppStream metainfo, and desktop entry.disable-android-for-flatpak.shto strip Android-specific plugins and configurations in-place, enabling builds in SDK-restricted environments.Summary by CodeRabbit
New Features
Chores