[tasks.flowy-macos] dependencies = ["flowy-sdk-build"] run_task = { name = ["flutter-build", "copy-to-product"] } script_runner = "@shell" [tasks.flutter-build] script = [ """ cd app_flowy/ flutter clean flutter pub get flutter build ${FLUTTER_PLATFORM} --${BUILD_FLAG} --build-name=${VERSION} """, ] script_runner = "@shell" [tasks.copy-to-product] script = [ """ product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION} output_path=${product_path}/${FLUTTER_OUTPUT_DIR} if [ -d "${output_path}" ]; then rm -rf ${output_path}/ fi mkdir -p ${output_path} product=${PRODUCT_NAME}.${PRODUCT_EXT} cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${FLUTTER_PLATFORM}/Build/Products/${FLUTTER_OUTPUT_DIR}/${product} \ ${output_path}/${product} """, ] script_runner = "@shell" [tasks.freeze_setup] script = [ """ flutter clean flutter pub get flutter pub run build_runner build --delete-conflicting-outputs """, ] script_runner = "@shell" [tasks.freeze_watch] script = [ """ flutter pub run build_runner watch """, ] script_runner = "@shell" [tasks.add_platform] description = "Add platform support" script = [""" flutter create --template=plugin --platforms=${@} . """] script_runner = "@shell"