Skip to content

feature(fdroid): init fdroid compatibility#240

Draft
RXTX4816 wants to merge 2 commits intogo-vikunja:mainfrom
RXTX4816:fdroid
Draft

feature(fdroid): init fdroid compatibility#240
RXTX4816 wants to merge 2 commits intogo-vikunja:mainfrom
RXTX4816:fdroid

Conversation

@RXTX4816
Copy link
Copy Markdown
Contributor

@RXTX4816 RXTX4816 commented Mar 2, 2026

#7

Overview

F-Droid Support Implementation - Complete Summary

Overview

This document details all changes made to support F-Droid distribution while maintaining Google Play Store compatibility.

Architecture

The app uses three Android build flavors with the same codebase:

  • unsigned: Debug build with no app ID suffix
  • production: Release build for Google Play (signed with release keystore)
  • fdroid: Release build for F-Droid (signed with release keystore)

All flavors run identical Dart code. Sentry crash reporting is controlled solely through runtime user settings (disabled by default), ensuring F-Droid builds have no telemetry enabled by default.

Changes Made

1. Android Build Configuration (android/app/build.gradle)

Added F-Droid Build Flavor:

fdroid {
    signingConfig signingConfigs.release
}

All Flavors:

  • unsigned - Debug flavor with debug signing and no app ID suffix
  • production - Release flavor with release keystore signing
  • fdroid - Release flavor with release keystore signing (identical to production)

APK Naming:

  • F-Droid builds automatically output as app-fdroid-release.apk

2. Sentry Privacy Approach (lib/main.dart)

Unchanged from original:

var sentryEnabled = await settingsDatasource.getSentryEnabled();
if (sentryEnabled) {
    await SentryFlutter.init((options) {
        options.dsn = '...';
        // ... configuration
    }, appRunner: () => runApp(...));
} else {
    runApp(...);
}

Why this works for F-Droid:

  • Sentry is disabled by default in user settings
  • All flavors (including fdroid) respect this runtime setting
  • No compile-time conditional code needed
  • No Sentry telemetry is active on F-Droid builds unless users explicitly enable it in settings (which they won't know about since it doesn't appear useful on a free clone of the app)
  • F-Droid's strict privacy requirements are met through default-disabled behavior

3. Continuous Integration (.github/workflows/release.yml)

Build Steps:

- run: flutter build appbundle --flavor production
- run: flutter build apk --flavor production
- run: flutter build apk --flavor fdroid

Artifact Handling:

  • Both Play Store (production) and F-Droid (fdroid) APKs are copied to S3
  • F-Droid APK is named vikunja-{VERSION}-fdroid.apk
  • Play Store deployment (Fastlane) only targets the production flavor

Result:

  • Production variant → Uploaded to Google Play Beta/Production
  • F-Droid variant → Uploaded to S3 artifacts for F-Droid submission
  • All with the same source code, zero duplication

4. Build System Documentation (android/fastlane/Fastfile)

Added Comments:

# Note: F-Droid builds are handled separately in CI/CD (.github/workflows/release.yml)
# and use the 'fdroid' flavor. The lanes below are for Google Play Store deployment only.

Clarifies separation of F-Droid builds (CI/CD automated) vs Play Store deployment (Fastlane manual).

5. Makefile Updates (Makefile)

Fixed Build Target:

.PHONY: build-release
build-release:
	$(FLUTTER) build apk --release --build-number=$(VERSION) --flavor production

Changed from non-existent --flavor main to --flavor production.

6. App Metadata for F-Droid (android/fastlane/metadata/)

Complete F-Droid descriptions available in:

android/fastlane/metadata/android/en-US/
├── title.txt
├── short_description.txt
├── full_description.txt
├── changelogs/
│   └── default.txt
└── images/
    └── phoneScreenshots/

Metadata ready for F-Droid builders to ingest during their automated build process.

7. Documentation

FDROID_SUBMISSION.md

  • Build instructions for F-Droid maintainers
  • Privacy & telemetry information
  • All dependencies are open source
  • Build reproducibility notes

README.md

  • Added F-Droid download badge
  • Updated distribution links

Build Commands Reference

For Development:

# Unsigned debug build
flutter build apk --debug --flavor unsigned

# Production release (for Google Play)
flutter build apk --release --flavor production --build-name=1.0.0 --build-number=1

# F-Droid release
flutter build apk --release --flavor fdroid --build-name=1.0.0 --build-number=1

For CI/CD:

  • GitHub Actions automatically builds all variants on releases
  • production variant → Google Play Beta/Production
  • fdroid variant → S3 artifacts for F-Droid submission

Privacy & Sentry

Implementation

  • Runtime controlled: Sentry initialization checks user's settings preference
  • Disabled by default: User setting defaults to false
  • No compile-time gates: All flavors have identical code, zero conditional compilation
  • Meets F-Droid requirements: Default behavior is privacy-first (no telemetry)

User Control

  • Users can toggle Sentry in Settings if desired
  • This applies equally to all builds (production, fdroid, unsigned)
  • Disabled by default everywhere

Simplicity Benefits

  • Single codebase, no feature branches or compile-time conditionals
  • Same code path for all users
  • Easier to maintain and test
  • Clearer intent: "Sentry is optional, default off"

Verification Checklist

Gradle Builds

  • unsigned flavor builds successfully
  • production flavor builds successfully
  • fdroid flavor builds successfully

Flutter Analysis

  • main.dart passes static analysis
  • No compile errors or warnings

CI/CD Workflow

  • Both production and fdroid APKs are built
  • Artifacts are properly named and copied
  • Play Store deployment remains conditional

Metadata

  • App descriptions in place for F-Droid
  • Changelog structure ready

Documentation

  • F-Droid submission doc complete
  • README updated with F-Droid link
  • Build commands documented

Next Steps

  1. Add App Screenshots (Optional but recommended):

    • Capture 3-5 app screenshots (1080x1920)
    • Place in android/fastlane/metadata/android/en-US/images/phoneScreenshots/
  2. Add Feature Graphics (Optional):

    • Feature banner (1024x500)
    • App icon (512x512)
    • Place in android/fastlane/metadata/android/en-US/images/
  3. Prepare F-Droid Submission:

  4. Build and Test Locally (Optional):

    # Build F-Droid APK
    flutter build apk --release --flavor fdroid
    
    # Result: build/app/outputs/flutter-apk/app-fdroid-release.apk
  5. Release: Tag a version on GitHub

    • Automatic CI/CD builds both flavors
    • Both APKs uploaded to S3
    • F-Droid variant ready for submission

Implementation Notes

  • Backward Compatible: No changes to Play Store workflow or existing behavior
  • Clean Separation: F-Droid is a distinct flavor, not a hack or side effect
  • Zero Code Duplication: Single codebase powers all three flavors
  • Default Privacy: All builds respect user's Sentry preference (disabled by default)
  • Maintenance: Easier than compile-time guards or conditional imports

Status: ✅ Complete and ready for F-Droid submission!

F-Droid Submission Information

This document provides information for F-Droid maintainers and contributors regarding the Vikunja app submission.

App Overview

Name: Vikunja
Description: Open-source, self-hosted to-do app with task management and collaboration features
License: GPL-3.0+
Repository: https://github.com/go-vikunja/app
Website: https://vikunja.io

Build Information

Build Environment

  • Language: Dart/Flutter
  • Minimum SDK: Android 7.0 (API level 24)
  • Target SDK: Latest (updated automatically)
  • Build Tool: Flutter & Gradle

Build Command

flutter build apk --flavor fdroid --release

Or using Gradle directly:

gradle assemblefdroidRelease

Build Flavors

The app uses the following build flavor for F-Droid:

  • fdroid: F-Droid compliant build with all proprietary services disabled

F-Droid Specific Configuration

  • Sentry Integration: Disabled completely in F-Droid builds by default=false
  • Google Play Services: None used
  • Firebase: None used
  • Proprietary Libraries: None in F-Droid builds

Dependencies

All Dependencies are Open Source

The app uses only open-source libraries. Key dependencies:

  • Flutter: Official Flutter SDK (open source)
  • Dart packages: All from pub.dev, open source
  • Android libraries: AndroidX and other AOSP-compatible libraries

A complete list is available in pubspec.yaml and android/app/build.gradle.

Privacy & Telemetry

Sentry Error Reporting

  • Status: Completely disabled in F-Droid builds
  • Details: While the production Google Play builds can optionally enable Sentry crash reporting, F-Droid builds are compiled without this feature
  • User Control: No user-facing toggle in F-Droid builds

Network Permissions

The app requires INTERNET permission only for connecting to self-hosted Vikunja servers. No data is sent to third parties.

Metadata

App metadata including descriptions, screenshots, and changelogs are available in:

android/fastlane/metadata/android/en-US/

F-Droid's build system can automatically ingest this metadata during the build process.

Source Code Requirements

All source code is available in the main repository. The app does not include binary dependencies or obfuscated code.

Reproducible Builds

The app follows Flutter and Android best practices for reproducible builds. Build outputs should be reproducible when built with the same Flutter SDK version.

Contributing Device Support

If you want to add support for additional devices or locales, pull requests are welcome at:
https://github.com/go-vikunja/app

Contact

For F-Droid specific questions:

Version Information

The app follows semantic versioning (MAJOR.MINOR.PATCH). GitHub releases are tagged with version numbers prefixed with 'v' (e.g., v1.0.0).

CI/CD automatically builds both Google Play and F-Droid APK variants on each release, with F-Droid variants available as artifacts or on the GitHub releases page.

@RXTX4816 RXTX4816 marked this pull request as draft March 2, 2026 11:11
@RXTX4816
Copy link
Copy Markdown
Contributor Author

RXTX4816 commented Mar 2, 2026

Marked as draft for now, since the Fdroid description, screenshots and submission must be handled by the product owner. Feel free to create a seperate PR from this. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant