forked from firka/firka
Compare commits
13 Commits
e61a19fbbf
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 23f7f7cd48 | |||
| c2879766eb | |||
| 01cc08d5f3 | |||
| c386e1194b | |||
| 67ed4e03eb | |||
| c7d1f80e79 | |||
| 7531e58114 | |||
| c1e329cb5a | |||
| dad52bf20e | |||
| 5fb6d03d9c | |||
| 1ef757d10f | |||
| 444abb83c2 | |||
| e835dcf6b1 |
22
build.sh
22
build.sh
@@ -1,12 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Build firka and/or firka_wear with version from pubspec + short git SHA.
|
||||
# Usage: ./build.sh [firka|firka_wear|all]
|
||||
# Default (no args) builds both.
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
||||
SHA=$(git -C "$ROOT" rev-parse --short HEAD)
|
||||
COMMIT_COUNT=$(git -C "$ROOT" rev-list --count HEAD)
|
||||
|
||||
build_app() {
|
||||
local APP="$1"
|
||||
@@ -16,22 +13,21 @@ build_app() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
local VERSION_LINE BUILD_NUMBER BASE_VERSION BUILD_NAME
|
||||
local VERSION_LINE BASE_VERSION BUILD_NAME VERSION_CODE
|
||||
VERSION_LINE=$(grep -E '^\s*version:\s*' "$PUBSPEC" | head -1)
|
||||
BASE_VERSION=$(echo "$VERSION_LINE" | sed -E 's/^[[:space:]]*version:[[:space:]]*([^+]+).*/\1/' | tr -d ' ')
|
||||
BUILD_NUMBER=""
|
||||
if [[ "$VERSION_LINE" == *+* ]]; then
|
||||
BUILD_NUMBER=$(echo "$VERSION_LINE" | sed -E 's/^[[:space:]]*version:[[:space:]]*[^+]+\+([0-9]+).*/\1/')
|
||||
fi
|
||||
BUILD_NAME="${BASE_VERSION}-${SHA}"
|
||||
|
||||
echo "Building $APP: version $BUILD_NAME (build number: ${BUILD_NUMBER:-none})"
|
||||
VERSION_CODE=$((2000 + COMMIT_COUNT))
|
||||
[[ "$APP" == "firka_wear" ]] && VERSION_CODE=$((VERSION_CODE + 1))
|
||||
|
||||
echo "Building $APP: version $BUILD_NAME (version code: $VERSION_CODE)"
|
||||
cd "$ROOT/$APP"
|
||||
|
||||
local FLUTTER_ARGS=(build appbundle --build-name="$BUILD_NAME" --verbose)
|
||||
[[ -n "${BUILD_NUMBER:-}" ]] && FLUTTER_ARGS+=(--build-number="$BUILD_NUMBER")
|
||||
flutter pub get
|
||||
dart run scripts/codegen.dart
|
||||
|
||||
flutter "${FLUTTER_ARGS[@]}"
|
||||
flutter build appbundle --build-name="$BUILD_NAME" --build-number="$VERSION_CODE" --verbose
|
||||
}
|
||||
|
||||
case "${1:-all}" in
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
android:name=".AppMain"
|
||||
android:icon="@mipmap/launcher_icon">
|
||||
|
||||
|
||||
<service
|
||||
android:name=".WearSyncForegroundService"
|
||||
android:exported="false"
|
||||
@@ -41,7 +40,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_ace"
|
||||
android:roundIcon="@mipmap/ic_ace_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -55,7 +54,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_ace_f"
|
||||
android:roundIcon="@mipmap/ic_ace_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -69,7 +68,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_bi"
|
||||
android:roundIcon="@mipmap/ic_bi_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -83,7 +82,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_bi_f"
|
||||
android:roundIcon="@mipmap/ic_bi_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -97,7 +96,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_cactus"
|
||||
android:roundIcon="@mipmap/ic_cactus_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -111,7 +110,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_cc"
|
||||
android:roundIcon="@mipmap/ic_cc_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -125,7 +124,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_enby"
|
||||
android:roundIcon="@mipmap/ic_enby_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -139,7 +138,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_enby_f"
|
||||
android:roundIcon="@mipmap/ic_enby_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -153,7 +152,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_fidesz"
|
||||
android:roundIcon="@mipmap/ic_fidesz_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -167,7 +166,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_filc"
|
||||
android:roundIcon="@mipmap/ic_filc_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -181,7 +180,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_filco"
|
||||
android:roundIcon="@mipmap/ic_filco_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -195,7 +194,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_galaxy"
|
||||
android:roundIcon="@mipmap/ic_galaxy_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -209,7 +208,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_gay"
|
||||
android:roundIcon="@mipmap/ic_gay_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -223,7 +222,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_gay_f"
|
||||
android:roundIcon="@mipmap/ic_gay_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -237,7 +236,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_half_firka_2"
|
||||
android:roundIcon="@mipmap/ic_half_firka_2_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -251,7 +250,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_kreta"
|
||||
android:roundIcon="@mipmap/ic_kreta_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -265,7 +264,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_lesb"
|
||||
android:roundIcon="@mipmap/ic_lesb_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -279,7 +278,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_lesb_f"
|
||||
android:roundIcon="@mipmap/ic_lesb_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -293,7 +292,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_lgbtq"
|
||||
android:roundIcon="@mipmap/ic_lgbtq_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -307,7 +306,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_lgbtq_f"
|
||||
android:roundIcon="@mipmap/ic_lgbtq_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -321,7 +320,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_lgbtqp"
|
||||
android:roundIcon="@mipmap/ic_lgbtqp_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -335,7 +334,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_lgbtqp_f"
|
||||
android:roundIcon="@mipmap/ic_lgbtqp_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -349,7 +348,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_lidl"
|
||||
android:roundIcon="@mipmap/ic_lidl_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -363,7 +362,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_mkkp"
|
||||
android:roundIcon="@mipmap/ic_mkkp_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -377,7 +376,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_nuke"
|
||||
android:roundIcon="@mipmap/ic_nuke_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -391,7 +390,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_modern"
|
||||
android:roundIcon="@mipmap/ic_modern_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -405,7 +404,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_o1g"
|
||||
android:roundIcon="@mipmap/ic_o1g_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -419,7 +418,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_old"
|
||||
android:roundIcon="@mipmap/ic_old_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -433,7 +432,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_paper"
|
||||
android:roundIcon="@mipmap/ic_paper_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -447,7 +446,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_pear"
|
||||
android:roundIcon="@mipmap/ic_pear_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -461,7 +460,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_pixel"
|
||||
android:roundIcon="@mipmap/ic_pixel_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -475,7 +474,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_pixelized"
|
||||
android:roundIcon="@mipmap/ic_pixelized_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -489,7 +488,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_pride"
|
||||
android:roundIcon="@mipmap/ic_pride_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -503,7 +502,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_proto"
|
||||
android:roundIcon="@mipmap/ic_proto_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -517,7 +516,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_refilc"
|
||||
android:roundIcon="@mipmap/ic_refilc_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -531,7 +530,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_refulc"
|
||||
android:roundIcon="@mipmap/ic_refulc_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -545,7 +544,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_repont"
|
||||
android:roundIcon="@mipmap/ic_repont_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -559,7 +558,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_szivacs"
|
||||
android:roundIcon="@mipmap/ic_szivacs_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -573,7 +572,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_tisza"
|
||||
android:roundIcon="@mipmap/ic_tisza_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -587,7 +586,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_trans"
|
||||
android:roundIcon="@mipmap/ic_trans_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -601,7 +600,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_trans_f"
|
||||
android:roundIcon="@mipmap/ic_trans_f_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -615,7 +614,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_void_icon"
|
||||
android:roundIcon="@mipmap/ic_void_icon_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -629,7 +628,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_xmas1"
|
||||
android:roundIcon="@mipmap/ic_xmas1_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -643,7 +642,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_xmas2"
|
||||
android:roundIcon="@mipmap/ic_xmas2_round" >
|
||||
|
||||
<intent-filter>
|
||||
@@ -657,7 +656,7 @@
|
||||
android:targetActivity=".MainActivity"
|
||||
android:exported="true"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:icon="@mipmap/ic_xmas3"
|
||||
android:roundIcon="@mipmap/ic_xmas3_round" >
|
||||
|
||||
<intent-filter>
|
||||
|
||||
@@ -816,7 +816,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\nfind \"$FLUTTER_APPLICATION_PATH/build/native_assets\" -exec xattr -c {} \\; 2>/dev/null || true\n";
|
||||
shellScript = "set -e\nNATIVE_ASSETS_DIR=\"$FLUTTER_APPLICATION_PATH/$FLUTTER_BUILD_DIR/native_assets\"\ncase \"$FLUTTER_BUILD_DIR\" in\n /*) NATIVE_ASSETS_DIR=\"$FLUTTER_BUILD_DIR/native_assets\" ;;\nesac\nif [ -d \"$FLUTTER_APPLICATION_PATH/.dart_tool/hooks_runner\" ]; then\n find \"$FLUTTER_APPLICATION_PATH/.dart_tool/hooks_runner\" -exec xattr -c {} \\; 2>/dev/null || true\nfi\nif [ -d \"$NATIVE_ASSETS_DIR\" ]; then\n find \"$NATIVE_ASSETS_DIR\" -exec xattr -c {} \\; 2>/dev/null || true\nfi\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
|
||||
};
|
||||
D576F90540C8E625A9A12317 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@@ -1076,7 +1076,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
@@ -1108,7 +1108,7 @@
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
@@ -1128,7 +1128,7 @@
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
@@ -1146,7 +1146,7 @@
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
@@ -1174,7 +1174,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = LiveActivityWidget.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1225,7 +1225,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = LiveActivityWidget.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1273,7 +1273,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = LiveActivityWidget.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1320,7 +1320,7 @@
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = FirkaWatchComplicationsExtension.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1373,7 +1373,7 @@
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = FirkaWatchComplicationsExtension.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1423,7 +1423,7 @@
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = FirkaWatchComplicationsExtension.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1474,7 +1474,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = HomeWidgetsExtension.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1525,7 +1525,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = HomeWidgetsExtension.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1572,7 +1572,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = HomeWidgetsExtension.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -1880,7 +1880,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
@@ -1916,7 +1916,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1101;
|
||||
CURRENT_PROJECT_VERSION = 1102;
|
||||
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1101</string>
|
||||
<string>1102</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
||||
Submodule firka/lib/l10n updated: 919a3af30f...8287ed0936
@@ -31,11 +31,11 @@ void main() async {
|
||||
ran = true;
|
||||
}
|
||||
|
||||
if (_isarOutOfDate(root)) {
|
||||
if (_isarOutOfDate(root) || _isarGeneratedFilesMissing(root)) {
|
||||
final inputs = _isarInputs(root);
|
||||
final hashes = _computeHashes(root, inputs);
|
||||
stdout.writeln(
|
||||
'Isar generated dart files out of date, running build_runner...',
|
||||
'Isar generated dart files out of date or missing, running build_runner...',
|
||||
);
|
||||
await _run('dart', ['run', 'build_runner', 'build'], root);
|
||||
_updateLockWithHashes(root, 'isar', hashes);
|
||||
@@ -240,6 +240,18 @@ bool _isarOutOfDate(String root) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool _isarGeneratedFilesMissing(String root) {
|
||||
final inputs = _isarInputs(root);
|
||||
if (inputs.isEmpty) return false;
|
||||
final modelsDir = p.join(root, 'lib/data/models');
|
||||
for (final dartFile in inputs) {
|
||||
final baseName = p.basenameWithoutExtension(dartFile.path);
|
||||
final gFile = File(p.join(modelsDir, '$baseName.g.dart'));
|
||||
if (!gFile.existsSync()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
List<File> _splashInputs(String root) {
|
||||
final config = File(p.join(root, 'flutter_native_splash.yaml'));
|
||||
final splashImage = File(p.join(root, 'assets/images/logos/splash.png'));
|
||||
|
||||
1
firka/vendor/fmb_dart
vendored
1
firka/vendor/fmb_dart
vendored
Submodule firka/vendor/fmb_dart deleted from fb711c8c40
@@ -9,6 +9,10 @@ import 'package:firka_wear/services/wear_sync_store.dart';
|
||||
late final Logger logger;
|
||||
|
||||
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
||||
|
||||
/// When non-null, the app should show [WearErrorScreen] with this error.
|
||||
final ValueNotifier<FlutterErrorDetails?> globalErrorNotifier =
|
||||
ValueNotifier<FlutterErrorDetails?>(null);
|
||||
late WearAppInitialization initData;
|
||||
bool initDone = false;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:wear_plus/wear_plus.dart';
|
||||
|
||||
import 'package:firka_wear/app/app_state.dart';
|
||||
import 'package:firka_wear/app/initialization.dart';
|
||||
import 'package:firka_wear/core/bloc/wear_sync_cubit.dart';
|
||||
import 'package:firka_wear/l10n/app_localizations.dart';
|
||||
import 'package:firka_wear/ui/theme/style.dart';
|
||||
import 'package:firka_wear/ui/wear/screens/error/error_screen.dart';
|
||||
import 'package:firka_wear/ui/wear/screens/home/home_screen.dart';
|
||||
import 'package:firka_wear/ui/wear/screens/login/login_screen.dart';
|
||||
|
||||
@@ -25,25 +25,7 @@ class WearInitializationScreen extends StatelessWidget {
|
||||
if (snapshot.hasError) {
|
||||
return MaterialApp(
|
||||
key: ValueKey('firkaErrorPage'),
|
||||
home: Scaffold(
|
||||
body: Center(
|
||||
child: WatchShape(
|
||||
builder: (context, shape, child) {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'Error initializing app: ${snapshot.error}',
|
||||
style: TextStyle(color: Colors.red),
|
||||
),
|
||||
child!,
|
||||
],
|
||||
);
|
||||
},
|
||||
child: SizedBox(),
|
||||
),
|
||||
),
|
||||
),
|
||||
home: WearErrorScreen(exception: snapshot.error!),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:firka_wear/app/app_state.dart';
|
||||
import 'package:firka_wear/app/initialization_screen.dart';
|
||||
import 'package:firka_wear/ui/wear/screens/error/error_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
@@ -26,5 +28,49 @@ void main() async {
|
||||
|
||||
await ScreenUtil.ensureScreenSize();
|
||||
|
||||
runApp(WearInitializationScreen());
|
||||
FlutterError.onError = (FlutterErrorDetails details) {
|
||||
FlutterError.presentError(details);
|
||||
if (_isFatalError(details.exception)) {
|
||||
globalErrorNotifier.value = details;
|
||||
}
|
||||
};
|
||||
|
||||
runZonedGuarded(() => runApp(const _WearAppWrapper()), (
|
||||
Object error,
|
||||
StackTrace stackTrace,
|
||||
) {
|
||||
if (_isFatalError(error)) {
|
||||
globalErrorNotifier.value = FlutterErrorDetails(
|
||||
exception: error,
|
||||
stack: stackTrace,
|
||||
library: 'firka_wear',
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bool _isFatalError(Object error) {
|
||||
return error is! AssertionError;
|
||||
}
|
||||
|
||||
class _WearAppWrapper extends StatelessWidget {
|
||||
const _WearAppWrapper();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ValueListenableBuilder<FlutterErrorDetails?>(
|
||||
valueListenable: globalErrorNotifier,
|
||||
builder: (context, error, _) {
|
||||
if (error != null) {
|
||||
return MaterialApp(
|
||||
home: WearErrorScreen(
|
||||
exception: error.exception,
|
||||
stackTrace: error.stack,
|
||||
),
|
||||
);
|
||||
}
|
||||
return WearInitializationScreen();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
65
firka_wear/lib/ui/wear/screens/error/error_screen.dart
Normal file
65
firka_wear/lib/ui/wear/screens/error/error_screen.dart
Normal file
@@ -0,0 +1,65 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
import 'package:wear_plus/wear_plus.dart';
|
||||
|
||||
import 'package:firka_wear/ui/theme/style.dart';
|
||||
|
||||
final int _kMaxQrPayloadChars = 410;
|
||||
|
||||
String errorPayload(Object exception, [StackTrace? stackTrace]) {
|
||||
final buffer = StringBuffer();
|
||||
buffer.writeln(exception.toString());
|
||||
if (stackTrace != null) buffer.write(stackTrace.toString());
|
||||
final s = buffer.toString();
|
||||
return s.length > _kMaxQrPayloadChars
|
||||
? s.substring(0, _kMaxQrPayloadChars)
|
||||
: s;
|
||||
}
|
||||
|
||||
/// Full-screen error UI: encodes [exception] (and [stackTrace]) into a QR code
|
||||
/// scaled to fit the watch's circular display so it is not clipped.
|
||||
class WearErrorScreen extends StatelessWidget {
|
||||
final Object exception;
|
||||
final StackTrace? stackTrace;
|
||||
|
||||
const WearErrorScreen({super.key, required this.exception, this.stackTrace});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ScreenUtil.init(context);
|
||||
|
||||
final payload = errorPayload(exception, stackTrace);
|
||||
return Scaffold(
|
||||
backgroundColor: wearStyle.colors.background,
|
||||
body: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return Center(
|
||||
child: WatchShape(
|
||||
builder: (context, shape, child) {
|
||||
return SizedBox(
|
||||
width: 350.w,
|
||||
height: 350.h,
|
||||
child: QrImageView(
|
||||
data: payload,
|
||||
version: 13,
|
||||
backgroundColor: wearStyle.colors.background,
|
||||
eyeStyle: QrEyeStyle(
|
||||
eyeShape: QrEyeShape.square,
|
||||
color: wearStyle.colors.textPrimary,
|
||||
),
|
||||
dataModuleStyle: QrDataModuleStyle(
|
||||
dataModuleShape: QrDataModuleShape.square,
|
||||
color: wearStyle.colors.textPrimary,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: const SizedBox.shrink(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ dependencies:
|
||||
flutter_svg: ^1.1.6
|
||||
logging: ^1.3.0
|
||||
flutter_bloc: ^9.0.0
|
||||
qr_flutter: ^4.1.0
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: any
|
||||
|
||||
@@ -30,11 +30,11 @@ void main() async {
|
||||
ran = true;
|
||||
}
|
||||
|
||||
if (_isarOutOfDate(root)) {
|
||||
if (_isarOutOfDate(root) || _isarGeneratedFilesMissing(root)) {
|
||||
final inputs = _isarInputs(root);
|
||||
final hashes = _computeHashes(root, inputs);
|
||||
stdout.writeln(
|
||||
'Isar generated dart files out of date, running build_runner...',
|
||||
'Isar generated dart files out of date or missing, running build_runner...',
|
||||
);
|
||||
await _run('dart', ['run', 'build_runner', 'build'], root);
|
||||
_updateLockWithHashes(root, 'isar', hashes);
|
||||
@@ -228,6 +228,18 @@ bool _isarOutOfDate(String root) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool _isarGeneratedFilesMissing(String root) {
|
||||
final inputs = _isarInputs(root);
|
||||
if (inputs.isEmpty) return false;
|
||||
final modelsDir = p.join(root, 'lib/data/models');
|
||||
for (final dartFile in inputs) {
|
||||
final baseName = p.basenameWithoutExtension(dartFile.path);
|
||||
final gFile = File(p.join(modelsDir, '$baseName.g.dart'));
|
||||
if (!gFile.existsSync()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Future<bool> _run(
|
||||
String executable,
|
||||
List<String> args,
|
||||
|
||||
Reference in New Issue
Block a user