Skip to content

Conversation

@Friedinger
Copy link
Member

This pull request introduces support for multiple build flavors (development and production) in the Flutter app. The changes include updates to the build configuration, Gradle setup, and main application entry point to handle the new flavors. The most important changes are summarized below.

Build workflow updates:

  • Updated .github/workflows/build.yml to include the --flavor option when building APKs and app bundles, and adjusted file paths to reflect the new production flavor. [1] [2] [3]

Gradle configuration changes:

  • Added flavorDimensions and defined development and production product flavors in android/app/build.gradle. Each flavor has a unique applicationIdSuffix and app name.

Application-level updates:

  • Modified AndroidManifest.xml to use a dynamic app name (@string/app_name) based on the selected flavor.
  • Updated lib/main.dart to inject the current flavor (development or production) into the app using the Provider package.

Flutter configuration:

  • Added a default-flavor configuration (development) in pubspec.yaml to set the default flavor for the app.

@Friedinger
Copy link
Member Author

Friedinger commented May 3, 2025

See https://github.com/RubberDuckCrew/gitdone/actions/runs/14810527854 for apk with production flavor.

Closes #56

@Friedinger Friedinger requested review from a team, IamPekka058 and Ruby11235 and removed request for a team May 3, 2025 11:54
@Friedinger Friedinger requested a review from IamPekka058 May 4, 2025 13:51
@Friedinger Friedinger merged commit 0ad06f8 into main May 4, 2025
1 check passed
@Friedinger Friedinger deleted the chore/flutter-flavors branch May 4, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ› οΈ Maintenance General maintenance and updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ§‘β€πŸ’» Add support for multiple app flavors to allow installing release and dev version at the same time

3 participants