flutter.toml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. [tasks.appflowy]
  2. mac_alias = "appflowy-macos"
  3. windows_alias = "appflowy-windows"
  4. [tasks.appflowy-macos]
  5. dependencies = ["flowy-sdk-release"]
  6. run_task = { name = ["flutter-build", "copy-to-product"] }
  7. script_runner = "@shell"
  8. [tasks.appflowy-windows]
  9. dependencies = ["flowy-sdk-release"]
  10. run_task = { name = ["flutter-build", "copy-to-product"] }
  11. [tasks.copy-to-product]
  12. mac_alias = "copy-to-product-macos"
  13. windows_alias = "copy-to-product-windows"
  14. [tasks.copy-to-product-macos]
  15. script = [
  16. """
  17. product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
  18. output_path=${product_path}/${TARGET_OS}/${FLUTTER_OUTPUT_DIR}
  19. if [ -d "${output_path}" ]; then
  20. rm -rf ${output_path}/
  21. fi
  22. mkdir -p ${output_path}
  23. product=${PRODUCT_NAME}.${PRODUCT_EXT}
  24. cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${TARGET_OS}/Build/Products/${FLUTTER_OUTPUT_DIR}/${product} \
  25. ${output_path}/${product}
  26. """,
  27. ]
  28. script_runner = "@shell"
  29. [tasks.copy-to-product-windows]
  30. script = [
  31. """
  32. """,
  33. ]
  34. script_runner = "@powershell"
  35. [tasks.flutter-build]
  36. script = [
  37. """
  38. cd app_flowy/
  39. flutter clean
  40. flutter pub get
  41. flutter build ${TARGET_OS} --${BUILD_FLAG} --build-name=${VERSION}
  42. """,
  43. ]
  44. script_runner = "@shell"
  45. [tasks.freeze_setup]
  46. script = [
  47. """
  48. flutter clean
  49. flutter pub get
  50. flutter pub run build_runner build --delete-conflicting-outputs
  51. """,
  52. ]
  53. script_runner = "@shell"
  54. [tasks.freeze_watch]
  55. script = [
  56. """
  57. flutter pub run build_runner watch
  58. """,
  59. ]
  60. script_runner = "@shell"