Skip to content

Commit

Permalink
Integrate build configs into flavors (#642)
Browse files Browse the repository at this point in the history
* Upgrade gradle wrapper

* Upgrade android plugin

* Allow using flavors to set build config

* Remove maps_launcher

* Fix usage of flavors

* Also build nuernberg in CI

* Upgrade to 7.3.1 and adjust build config usage

* Fix workflow names

* Set exported

* Update run configs
  • Loading branch information
maxammann authored Jan 9, 2023
1 parent 6618257 commit 13d8750
Show file tree
Hide file tree
Showing 34 changed files with 315 additions and 187 deletions.
37 changes: 29 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,33 @@ workflows:
jobs:
- check-frontend
- frontend-android-build:
name: frontend-android-build-bayern-floss
buildConfig: "bayern-floss"
flutterFlavor: "BayernFloss"
requires:
- check-frontend
- frontend-android-build:
name: frontend-android-build-bayern
buildConfig: "bayern"
flutterFlavor: "Bayern"
requires:
- check-frontend
- frontend-ios-build:
name: frontend-ios-build-bayern
buildConfig: "bayern"
flutterFlavor: "Bayern"
requires:
- check-frontend
- frontend-android-build:
name: frontend-android-build-nuernberg
buildConfig: "nuernberg"
flutterFlavor: "Nuernberg"
requires:
- check-frontend
- frontend-ios-build:
name: frontend-ios-build-nuernberg
buildConfig: "nuernberg"
flutterFlavor: "Nuernberg"
requires:
- check-frontend
- backend-build
Expand Down Expand Up @@ -175,8 +193,10 @@ jobs:
buildConfig:
description: "Name of the build config to use"
type: string
flutterFlavor:
description: "Flutter Flavor to use"
type: string
environment:
BUILD_CONFIG_NAME: << parameters.buildConfig >>
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m" -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2'
resource_class: large
working_directory: ~/project/frontend
Expand All @@ -202,11 +222,11 @@ jobs:
- run:
name: Build Runner
command: |
fvm --verbose flutter pub run build_runner build --define "df_build_config=name=$BUILD_CONFIG_NAME"
fvm --verbose flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>"
- run:
name: Build
command: |
fvm --verbose flutter build apk --dart-define=environment=production --release -t lib/main.dart
fvm --verbose flutter build apk --dart-define=environment=production --flavor << parameters.flutterFlavor >> --release -t lib/main.dart
- store_artifacts:
path: build/app/outputs/flutter-apk/

Expand All @@ -217,9 +237,10 @@ jobs:
buildConfig:
description: "Name of the build config to use"
type: string
flutterFlavor:
description: "Flutter Flavor to use"
type: string
working_directory: ~/project/frontend
environment:
BUILD_CONFIG_NAME: << parameters.buildConfig >>
steps:
- checkout:
path: ~/project
Expand Down Expand Up @@ -248,12 +269,12 @@ jobs:
- run:
name: Build Runner
command: |
fvm --verbose flutter pub run build_runner build --define "df_build_config=name=$BUILD_CONFIG_NAME"
fvm --verbose flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>"
- run:
name: Build
command: |
app-toolbelt v0 build-config write-xcconfig "$BUILD_CONFIG_NAME" ios --directory ios/
fvm --verbose flutter build ios --dart-define=environment=production --no-codesign --release -t lib/main.dart
app-toolbelt v0 build-config write-xcconfig "<< parameters.buildConfig >>" ios --directory ios/
fvm --verbose flutter build ios --dart-define=environment=production --flavor << parameters.flutterFlavor >> --no-codesign --release -t lib/main.dart
backend-build:
environment:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/runConfigurations/Run_Flutter__local_.xml

This file was deleted.

10 changes: 10 additions & 0 deletions .idea/runConfigurations/Run__env_local_buildConfig_bayern_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/Test_administration.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions frontend/android/.idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions frontend/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions frontend/android/.idea/runConfigurations.xml

This file was deleted.

Loading

0 comments on commit 13d8750

Please sign in to comment.