Skip to content

Flatpak manifest tooling for the offline build of Flutter apps

License

Notifications You must be signed in to change notification settings

TheAppgineer/flatpak-flutter

Repository files navigation

flatpak-flutter

Flatpak manifest tooling for the offline build of Flutter apps

Introduction

flatpak-flutter can help in fulfilling the Flathub publishing requirement to have an offline build, with the additional benifits of building from source.

Being able to build from source makes it easy to also release for the aarch64 architecture (arm64).

A Three Stage Rocket

These are the three steps that flatpak-flutter takes during the building process:

  • Perform a local and online build
  • Extract the necessary sources from the online build
  • Perform the offline build

Now the reproducible and offline build can be published. The above process only has to be repeated if app dependencies change or have updates.

The TODO Example

What better way to demonstrate the tool then by building a TODO app :)

Easily done by executing the flatpak-flutter script:

./flatpak-flutter.sh

flatpak-flutter TODO Example

Note: The TODO app is an unmodified 3th party app.

Flutter App Integration

The basic steps for building any flutter app are:

  • Clone the app manifest repo in the root directory of flatpak-flutter
  • Create the manifest for online build: <app_id>/<app_id>-online.yml
  • Create the manifest for offline build: <app_id>/<app_id>.yml
  • Build it!
    ./flatpak-flutter.sh <app_id>
    

The app_id and the app manifest repo should be named equal, as also required for publishing.

Note: For the creation of the manifest files the included TODO app can be used as an example.

Apps Published Using flatpak-flutter

Note: Get in contact if you know about an app using flatpak-flutter and not on this list!

About

Flatpak manifest tooling for the offline build of Flutter apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published