2021-01-24 12:56:14 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-05-27 23:35:37 +08:00
|
|
|
ENV_FILE_PATH=assets/files
|
|
|
|
ENV_FILE=$ENV_FILE_PATH/environment_variables.txt
|
|
|
|
|
2021-05-28 00:27:11 +08:00
|
|
|
GEN_FILE_PATH=lib/generated
|
|
|
|
FLUTTER_VERSION_FILE=$GEN_FILE_PATH/flutter_version.dart
|
|
|
|
|
2021-03-21 21:38:28 +08:00
|
|
|
cd src/ui/flutter_app || exit
|
2021-05-27 23:35:37 +08:00
|
|
|
|
2021-05-29 10:50:17 +08:00
|
|
|
flutter config --no-analytics
|
|
|
|
|
2021-05-29 10:35:49 +08:00
|
|
|
flutter pub get
|
2021-06-24 00:09:47 +08:00
|
|
|
|
2021-10-18 19:33:11 +08:00
|
|
|
flutter gen-l10n
|
2021-10-14 22:02:34 +08:00
|
|
|
|
|
|
|
mkdir -p "$GEN_FILE_PATH" || true
|
|
|
|
|
|
|
|
echo "const Map<String, String> flutterVersion =" >"$FLUTTER_VERSION_FILE"
|
|
|
|
flutter --version --machine >>"$FLUTTER_VERSION_FILE"
|
|
|
|
echo ";" >>"$FLUTTER_VERSION_FILE"
|
2021-05-28 00:27:11 +08:00
|
|
|
|
2021-10-14 22:02:34 +08:00
|
|
|
mkdir -p "$ENV_FILE_PATH" || true
|
|
|
|
touch "$ENV_FILE"
|
|
|
|
export >"$ENV_FILE"
|
2021-05-28 00:27:11 +08:00
|
|
|
|
2021-11-13 11:10:43 +08:00
|
|
|
flutter pub global deactivate build_runner
|
2021-10-14 22:02:34 +08:00
|
|
|
flutter pub global activate build_runner
|
2021-10-18 21:10:38 +08:00
|
|
|
flutter pub run build_runner build --delete-conflicting-outputs
|