flutter.toml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${FLUTTER_PLATFORM}/Build/Products/${FLUTTER_OUTPUT_DIR}/${PRODUCT_NAME} \
  25. ${output_path}/${PRODUCT_NAME}
  26. """,
  27. ]
  28. script_runner = "@shell"
  29. [tasks.freeze_setup]
  30. script = [
  31. """
  32. flutter clean
  33. flutter pub get
  34. flutter pub run build_runner build --delete-conflicting-outputs
  35. """,
  36. ]
  37. script_runner = "@shell"
  38. [tasks.freeze_watch]
  39. script = [
  40. """
  41. flutter pub run build_runner watch
  42. """,
  43. ]
  44. script_runner = "@shell"
  45. [tasks.add_platform]
  46. description = "Add platform support"
  47. script = ["""
  48. flutter create --template=plugin --platforms=${@} .
  49. """]
  50. script_runner = "@shell"