Files
musicshare/docs/FDROID.md
T
chrisandClaude Opus 5.5 a4dad724ad
CI / check (push) Canceled after 0s
Get the repo ready for F-Droid
- License: AGPL-3.0-or-later (LICENSE, every package.json, README).
- MUSICSHARE_FOSS=1 builds leave out the only closed-source code, Google's
  ML Kit / Play Services barcode scanner bundled by expo-camera; the scan
  screen then decodes small camera snapshots with jsQR instead.
- Expo modules build from source rather than from precompiled AARs, as
  F-Droid requires (that's also what makes the scanner switch take effect).
  Verified: a FOSS build contains no ML Kit or Play Services classes.
- Release builds default to the production server, and come out unsigned
  without our upload key (F-Droid signs with its own). versionCode 1.
- Store listing in fastlane/metadata/android, a draft fdroiddata recipe in
  fdroid/, and docs/FDROID.md with the submission steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8
2026-10-06 15:26:59 -04:00

3.0 KiB

Releasing on F-Droid

The Android app can be built with no closed-source code: MUSICSHARE_FOSS=1 leaves out Google's ML Kit / Play Services barcode scanner that expo-camera normally bundles, and the QR scanner then decodes camera snapshots with jsQR instead (apps/mobile/src/lib/qrSnapshot.ts). Everything else in the app is already open source. Expo's native modules are built from source rather than from Expo's precompiled AARs (expo.autolinking.android.buildFromSource in apps/mobile/package.json), which F-Droid requires and which is also what lets the scanner be switched off. Release builds without our signing key come out unsigned, which is what F-Droid wants: it signs with its own key.

What's in the repo for this

  • LICENSE: AGPL-3.0 (also set in every package.json).
  • fastlane/metadata/android/en-US/: the store listing F-Droid shows (title, descriptions, icon, changelogs, screenshots).
  • fdroid/tech.chrisedwards.musicshare.yml: a draft of the build recipe for fdroiddata.
  • apps/mobile/app.config.ts: the MUSICSHARE_FOSS=1 switch (turns off expo-camera's ML Kit scanner).

Before submitting

  1. Publish the source somewhere public, such as Codeberg (popular with F-Droid apps) or GitHub, and put its URL in place of PUBLIC_REPO_URL in the recipe.
  2. Add screenshots: 2-8 portrait PNGs in fastlane/metadata/android/en-US/images/phoneScreenshots/ named 1.png, 2.png, and so on.
  3. Tag the release: git tag v1.0.0 && git push --tags. F-Droid builds from tags.
  4. Check the FOSS build yourself:
    cd apps/mobile
    MUSICSHARE_FOSS=1 CI=1 npx expo prebuild --platform android --clean --no-install
    cd android && ./gradlew :app:assembleRelease
    # nothing from Google's closed-source libraries should be inside:
    unzip -l app/build/outputs/apk/release/app-release*.apk | grep -iE 'mlkit|gms' || echo clean
    

Submitting

  1. Fork https://gitlab.com/fdroid/fdroiddata, copy the recipe to metadata/tech.chrisedwards.musicshare.yml.
  2. Test it with fdroid readmeta, fdroid lint tech.chrisedwards.musicshare and fdroid build -v -l tech.chrisedwards.musicshare (fdroidserver, or their Docker image).
  3. Open a merge request. Reviewers often ask for changes to how Node is installed or how npm dependencies are fetched for React Native apps; that's normal.

The listing will carry the NonFreeNet anti-feature, because the app can connect to Spotify, Apple Music, Last.fm and Plex. That's expected and doesn't block inclusion.

Releasing an update

  1. Bump version and android.versionCode in apps/mobile/app.json.
  2. Add fastlane/metadata/android/en-US/changelogs/<versionCode>.txt.
  3. Commit, tag v<version>, push the tag. F-Droid picks it up automatically (AutoUpdateMode).

IzzyOnDroid (faster alternative)

IzzyOnDroid's repository lists apps from signed APKs attached to releases, usually within days, and F-Droid's client can add it. Attach the APK built with our key (or the FOSS build) to each release on the public repo and request inclusion at https://gitlab.com/IzzyOnDroid/repo.