flutter.toml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. product_path= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
  33. output_path= set ${product_path}/${TARGET_OS}
  34. if is_path_exists ${output_path}
  35. rm -r ${output_path}/
  36. fi
  37. mkdir ${output_path}
  38. product= set ${PRODUCT_NAME}
  39. glob_cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${TARGET_OS}/runner/${FLUTTER_OUTPUT_DIR}/**/* \
  40. ${output_path}/${product}
  41. """,
  42. ]
  43. script_runner = "@duckscript"
  44. [tasks.flutter-build]
  45. script = [
  46. """
  47. cd app_flowy/
  48. flutter clean
  49. flutter pub get
  50. flutter build ${TARGET_OS} --${BUILD_FLAG} --build-name=${VERSION}
  51. """,
  52. ]
  53. script_runner = "@shell"
  54. [tasks.flutter-build.windows]
  55. script = [
  56. """
  57. cd app_flowy
  58. exec cmd.exe /c flutter clean
  59. exec cmd.exe /c flutter pub get
  60. exec cmd.exe /c flutter build ${TARGET_OS} --${BUILD_FLAG}
  61. """,
  62. ]
  63. script_runner = "@duckscript"
  64. [tasks.freeze_setup]
  65. script = [
  66. """
  67. flutter clean
  68. flutter pub get
  69. flutter pub run build_runner build --delete-conflicting-outputs
  70. """,
  71. ]
  72. script_runner = "@shell"
  73. [tasks.freeze_watch]
  74. script = [
  75. """
  76. flutter pub run build_runner watch
  77. """,
  78. ]
  79. script_runner = "@shell"