2021-06-19 15:41:19 +00:00
|
|
|
|
2021-11-17 06:17:46 +00:00
|
|
|
[tasks.env_check]
|
2023-01-17 08:27:17 +00:00
|
|
|
dependencies = ["echo_env", "install_flutter_protobuf"]
|
2023-01-01 15:26:27 +00:00
|
|
|
condition = { env_set = [
|
|
|
|
"BUILD_FLAG",
|
|
|
|
"RUST_COMPILE_TARGET",
|
|
|
|
"CRATE_TYPE",
|
|
|
|
"TARGET_OS",
|
|
|
|
], channels = [
|
|
|
|
"stable",
|
|
|
|
] }
|
2021-11-17 06:17:46 +00:00
|
|
|
|
2023-02-02 15:02:49 +00:00
|
|
|
[tasks.appflowy-core-dev]
|
|
|
|
mac_alias = "appflowy-core-dev-macos"
|
|
|
|
windows_alias = "appflowy-core-dev-windows"
|
|
|
|
linux_alias = "appflowy-core-dev-linux"
|
2021-11-17 06:17:46 +00:00
|
|
|
|
2023-02-02 15:02:49 +00:00
|
|
|
[tasks.appflowy-core-dev-macos]
|
2021-11-17 06:17:46 +00:00
|
|
|
category = "Build"
|
|
|
|
dependencies = ["env_check"]
|
2023-01-01 15:26:27 +00:00
|
|
|
run_task = { name = [
|
|
|
|
"setup-crate-type",
|
2023-09-05 01:31:23 +00:00
|
|
|
"sdk-dev-build",
|
2023-01-01 15:26:27 +00:00
|
|
|
"post-desktop",
|
|
|
|
"restore-crate-type",
|
|
|
|
] }
|
2021-11-17 06:17:46 +00:00
|
|
|
|
2023-02-02 15:02:49 +00:00
|
|
|
[tasks.appflowy-core-dev-windows]
|
2021-11-17 06:17:46 +00:00
|
|
|
category = "Build"
|
|
|
|
dependencies = ["env_check"]
|
2023-01-01 15:26:27 +00:00
|
|
|
run_task = { name = [
|
|
|
|
"setup-crate-type",
|
2023-09-05 01:31:23 +00:00
|
|
|
"sdk-dev-build",
|
2023-01-01 15:26:27 +00:00
|
|
|
"post-desktop",
|
|
|
|
"restore-crate-type",
|
|
|
|
] }
|
2021-07-25 03:08:59 +00:00
|
|
|
|
2023-02-02 15:02:49 +00:00
|
|
|
[tasks.appflowy-core-dev-linux]
|
2021-11-19 03:13:07 +00:00
|
|
|
category = "Build"
|
|
|
|
dependencies = ["env_check"]
|
2023-01-01 15:26:27 +00:00
|
|
|
run_task = { name = [
|
|
|
|
"setup-crate-type",
|
2023-09-05 01:31:23 +00:00
|
|
|
"sdk-dev-build",
|
2023-01-01 15:26:27 +00:00
|
|
|
"post-desktop",
|
|
|
|
"restore-crate-type",
|
|
|
|
] }
|
2022-10-15 15:34:56 +00:00
|
|
|
|
2021-11-17 06:17:46 +00:00
|
|
|
#
|
2023-09-05 01:31:23 +00:00
|
|
|
[tasks.sdk-dev-build]
|
2024-01-03 03:41:29 +00:00
|
|
|
dependencies = ["set-app-version"]
|
2021-11-17 06:17:46 +00:00
|
|
|
private = true
|
2021-06-19 15:41:19 +00:00
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
cd rust-lib/
|
2023-11-28 02:54:31 +00:00
|
|
|
RUSTFLAGS="--cfg tokio_unstable" cargo build --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}"
|
2021-06-19 15:41:19 +00:00
|
|
|
cd ../
|
|
|
|
""",
|
|
|
|
]
|
2021-11-14 14:46:59 +00:00
|
|
|
script_runner = "@shell"
|
2021-06-19 15:41:19 +00:00
|
|
|
|
2023-09-05 01:31:23 +00:00
|
|
|
[tasks.sdk-dev-build.mac]
|
2024-01-03 03:41:29 +00:00
|
|
|
dependencies = ["set-app-version"]
|
2023-08-05 07:02:05 +00:00
|
|
|
private = true
|
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
cd rust-lib/
|
2023-11-12 10:00:07 +00:00
|
|
|
RUSTFLAGS="--cfg tokio_unstable" cargo build --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}"
|
2023-08-05 07:02:05 +00:00
|
|
|
cd ../
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@shell"
|
|
|
|
|
2023-09-05 01:31:23 +00:00
|
|
|
[tasks.sdk-dev-build.windows]
|
2024-01-03 03:41:29 +00:00
|
|
|
dependencies = ["set-app-version"]
|
2021-11-23 00:28:59 +00:00
|
|
|
private = true
|
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
cd rust-lib
|
2023-01-12 05:09:08 +00:00
|
|
|
exec cargo build --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}"
|
2021-11-23 00:28:59 +00:00
|
|
|
cd ..
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@duckscript"
|
|
|
|
|
2021-11-17 06:17:46 +00:00
|
|
|
#
|
2023-02-02 15:02:49 +00:00
|
|
|
[tasks.appflowy-core-release]
|
2021-11-17 06:17:46 +00:00
|
|
|
description = "Build flowy sdk in release mode"
|
|
|
|
category = "Build"
|
|
|
|
dependencies = ["env_check"]
|
2023-01-01 15:26:27 +00:00
|
|
|
run_task = { name = [
|
|
|
|
"setup-crate-type",
|
|
|
|
"sdk-release-build",
|
|
|
|
"post-desktop",
|
|
|
|
"restore-crate-type",
|
|
|
|
] }
|
2021-11-04 14:13:05 +00:00
|
|
|
|
2021-11-17 06:17:46 +00:00
|
|
|
#
|
|
|
|
[tasks.sdk-release-build]
|
2024-01-03 03:41:29 +00:00
|
|
|
dependencies = ["set-app-version"]
|
2023-11-28 02:54:31 +00:00
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
cd rust-lib/
|
|
|
|
cargo build --profile ${CARGO_PROFILE} --${BUILD_FLAG} --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}"
|
|
|
|
cd ../
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@shell"
|
|
|
|
|
|
|
|
[tasks.sdk-release-build.mac]
|
2024-01-03 03:41:29 +00:00
|
|
|
dependencies = ["set-app-version"]
|
2021-11-17 06:17:46 +00:00
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
cd rust-lib/
|
2023-09-05 01:31:23 +00:00
|
|
|
cargo build --profile ${CARGO_PROFILE} --${BUILD_FLAG} --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}"
|
2021-11-17 06:17:46 +00:00
|
|
|
cd ../
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@shell"
|
|
|
|
|
|
|
|
#
|
2021-06-19 15:41:19 +00:00
|
|
|
[tasks.post-desktop]
|
2021-11-17 06:17:46 +00:00
|
|
|
mac_alias = "post-desktop-macos"
|
|
|
|
windows_alias = "post-desktop-windows"
|
2021-11-19 03:13:07 +00:00
|
|
|
linux_alias = "post-desktop-linux"
|
2021-11-17 06:17:46 +00:00
|
|
|
|
|
|
|
[tasks.post-desktop-macos]
|
2021-11-04 10:03:36 +00:00
|
|
|
private = true
|
2021-06-19 15:41:19 +00:00
|
|
|
script = [
|
|
|
|
"""
|
2023-02-02 15:02:49 +00:00
|
|
|
echo "🚀 🚀 🚀 AppFlowy-Core build success"
|
2023-02-26 08:27:17 +00:00
|
|
|
dart_ffi_dir= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/packages/appflowy_backend/${TARGET_OS}
|
2022-10-15 15:34:56 +00:00
|
|
|
lib = set lib${LIB_NAME}.${LIB_EXT}
|
2021-11-20 01:32:46 +00:00
|
|
|
|
2022-02-19 08:48:57 +00:00
|
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/${lib} \
|
|
|
|
${dart_ffi_dir}/${lib}
|
2021-11-17 06:17:46 +00:00
|
|
|
|
|
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/binding.h \
|
2022-02-19 08:48:57 +00:00
|
|
|
${dart_ffi_dir}/Classes/binding.h
|
2021-06-19 15:41:19 +00:00
|
|
|
""",
|
2021-11-17 06:17:46 +00:00
|
|
|
]
|
|
|
|
script_runner = "@duckscript"
|
|
|
|
|
|
|
|
[tasks.post-desktop-windows]
|
|
|
|
private = true
|
|
|
|
script = [
|
2021-06-19 15:41:19 +00:00
|
|
|
"""
|
2023-02-02 15:02:49 +00:00
|
|
|
echo "🚀 🚀 🚀 AppFlowy-Core build success"
|
2023-02-26 08:27:17 +00:00
|
|
|
dart_ffi_dir= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/windows/flutter/dart_ffi
|
2022-10-15 15:34:56 +00:00
|
|
|
lib = set ${LIB_NAME}.${LIB_EXT}
|
2021-11-18 08:18:20 +00:00
|
|
|
|
|
|
|
# copy dll
|
2022-02-19 08:48:57 +00:00
|
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/${lib} \
|
|
|
|
${dart_ffi_dir}/${lib}
|
2021-11-17 06:17:46 +00:00
|
|
|
|
2021-11-18 08:18:20 +00:00
|
|
|
# copy binding.h
|
2021-06-19 15:41:19 +00:00
|
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/binding.h \
|
2021-11-18 08:18:20 +00:00
|
|
|
${dart_ffi_dir}/binding.h
|
2021-06-19 15:41:19 +00:00
|
|
|
""",
|
2021-11-04 10:03:36 +00:00
|
|
|
]
|
|
|
|
script_runner = "@duckscript"
|
|
|
|
|
2021-11-19 03:13:07 +00:00
|
|
|
[tasks.post-desktop-linux]
|
|
|
|
private = true
|
|
|
|
script = [
|
|
|
|
"""
|
2023-02-02 15:02:49 +00:00
|
|
|
echo "🚀 🚀 🚀 AppFlowy-Core build success"
|
2023-02-26 08:27:17 +00:00
|
|
|
dart_ffi_dir= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/linux/flutter/dart_ffi
|
2022-10-15 15:34:56 +00:00
|
|
|
lib = set lib${LIB_NAME}.${LIB_EXT}
|
2021-11-19 03:13:07 +00:00
|
|
|
|
|
|
|
# copy dll
|
2022-02-19 08:48:57 +00:00
|
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/${lib} \
|
|
|
|
${dart_ffi_dir}/${lib}
|
2021-11-19 03:13:07 +00:00
|
|
|
|
|
|
|
# copy binding.h
|
|
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/binding.h \
|
|
|
|
${dart_ffi_dir}/binding.h
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@duckscript"
|
2024-01-03 03:41:29 +00:00
|
|
|
|
|
|
|
[tasks.set-app-version]
|
|
|
|
script = ["""
|
|
|
|
if is_empty ${APP_VERSION}
|
|
|
|
APP_VERSION = set ${APPFLOWY_VERSION}
|
|
|
|
set_env APP_VERSION ${APPFLOWY_VERSION}
|
|
|
|
end
|
|
|
|
echo APP_VERSION: ${APP_VERSION}
|
|
|
|
"""]
|
|
|
|
script_runner = "@duckscript"
|