From 60ba2cb00120d37119eb650636d4d350c2c7a0fa Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Thu, 7 Sep 2023 17:17:41 +0200 Subject: [PATCH] feat: Allow building pigeon files --- src/flutter/build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/flutter/build.sh b/src/flutter/build.sh index a71b4ea..ff0a6de 100644 --- a/src/flutter/build.sh +++ b/src/flutter/build.sh @@ -80,6 +80,12 @@ while [[ $# -gt 0 ]]; do SEND_NOTIFICATION=n shift ;; + --pigeon) + # Specifies to run `dart run pigeon --input $2` + PIGEON_FILES="$PIGEON_FILES $2" + shift + shift + ;; *) echo "Unknown argument: $1" shift @@ -113,6 +119,7 @@ echo "===== ${NAME} =====" echo "Building version ${version}" echo "Moving APKs into ${release_dir} after build" echo "Clean build: ${CLEAN_BUILD}" +echo "Pigeons to build: ${PIGEON_FILES}" echo "Skipping build: ${SKIP_BUILD}" echo "Sending notification: ${SEND_NOTIFICATION}" echo "APKs already signed: ${ALREADY_SIGNED}" @@ -155,6 +162,11 @@ else # Build everything again 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 flutter build apk \ --release \