feat: Allow building pigeon files

This commit is contained in:
PapaTutuWawa 2023-09-07 17:17:41 +02:00
parent 082bc175c0
commit 60ba2cb001

View File

@ -80,6 +80,12 @@ while [[ $# -gt 0 ]]; do
SEND_NOTIFICATION=n SEND_NOTIFICATION=n
shift shift
;; ;;
--pigeon)
# Specifies to run `dart run pigeon --input $2`
PIGEON_FILES="$PIGEON_FILES $2"
shift
shift
;;
*) *)
echo "Unknown argument: $1" echo "Unknown argument: $1"
shift shift
@ -113,6 +119,7 @@ echo "===== ${NAME} ====="
echo "Building version ${version}" echo "Building version ${version}"
echo "Moving APKs into ${release_dir} after build" echo "Moving APKs into ${release_dir} after build"
echo "Clean build: ${CLEAN_BUILD}" echo "Clean build: ${CLEAN_BUILD}"
echo "Pigeons to build: ${PIGEON_FILES}"
echo "Skipping build: ${SKIP_BUILD}" echo "Skipping build: ${SKIP_BUILD}"
echo "Sending notification: ${SEND_NOTIFICATION}" echo "Sending notification: ${SEND_NOTIFICATION}"
echo "APKs already signed: ${ALREADY_SIGNED}" echo "APKs already signed: ${ALREADY_SIGNED}"
@ -155,6 +162,11 @@ else
# Build everything again # Build everything again
flutter pub run build_runner build --delete-conflicting-outputs flutter pub run build_runner build --delete-conflicting-outputs
# Build pigeons
for pigeon in $PIGEON_FILES; do
dart run pigeon --input $pigeon
done
# Build the release apk # Build the release apk
flutter build apk \ flutter build apk \
--release \ --release \