flutter.toml 1.3 KB

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