Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
[flutter]: update build script
appflowyb0a818b81384
diff --git a/Makefile.toml b/Makefile.tomlindex eca41798a2..17da5d5a5f 100644--- a/Makefile.toml+++ b/Makefile.toml@@ -20,7 +20,7 @@ PRODUCT_NAME = "AppFlowy"DEV = truePROD = falseTARGET_OS = "macos"-DEPLOY_TARGET = "x86_64-apple-darwin"+RUST_COMPILE_TARGET = "x86_64-apple-darwin"CRATE_TYPE = "cdylib"BUILD_FLAG = "debug"FLUTTER_PLATFORM = "macos"@@ -33,7 +33,7 @@ PRODUCT_EXT = "app"DEV = falsePROD = trueTARGET_OS = "macos"-DEPLOY_TARGET = "aarch64-apple-darwin"+RUST_COMPILE_TARGET = "aarch64-apple-darwin"CRATE_TYPE = "cdylib"BUILD_FLAG = "release"FLUTTER_PLATFORM = "macos"@@ -65,6 +65,7 @@ PRODUCT_EXT = "apk"DEV = falsePROD = trueTARGET_OS = "windows"+RUST_COMPILE_TARGET = "x86_64-pc-windows-gnu"CRATE_TYPE = "cdylib"BUILD_FLAG = "release"FLUTTER_PLATFORM = "windows"diff --git a/rust-lib/dart-ffi/Cargo.toml b/rust-lib/dart-ffi/Cargo.tomlindex 6c5e3e29a0..025e2c8e81 100644--- a/rust-lib/dart-ffi/Cargo.toml+++ b/rust-lib/dart-ffi/Cargo.toml@@ -7,11 +7,8 @@ edition = "2018"[lib]name = "dart_ffi"# this value will change depending on the target os-# for iOS it would be ``-# for Macos it would be ``-# for android it would be `c-dylib`-# default-crate-type = [""]+# default dylib+crate-type = ["dylib"][dependencies]diff --git a/scripts/makefile/desktop.toml b/scripts/makefile/desktop.tomlindex 4dc33435ed..df93c9043f 100644--- a/scripts/makefile/desktop.toml+++ b/scripts/makefile/desktop.toml@@ -17,13 +17,14 @@ script = [cd rust-lib/if [ ${PROD} == true ]then- cargo build --${BUILD_FLAG} --package=dart-ffi --target ${DEPLOY_TARGET} --features=${FEATURES}+ cargo build --${BUILD_FLAG} --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features=${FEATURES}else- cargo build --package=dart-ffi --target ${DEPLOY_TARGET} --features=${FEATURES}+ cargo build --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features=${FEATURES}ficd ../""",]+script_runner = "@shell"[tasks.post-desktop]@@ -32,7 +33,7 @@ condition = { platforms = ["mac"] }script = ["""echo "π π π Flowy-SDK build success"- cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${DEPLOY_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib \+ cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib \${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages/flowy_sdk/macos/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib""","""@@ -50,7 +51,7 @@ script = [# post the dylib target_path that use for flutter unit testtarget_path = set ${TMPDIR}/appflowy_client/lib${CARGO_MAKE_CRATE_FS_NAME}.dylibrm ${target_path}- cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${DEPLOY_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib ${target_path}+ cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib ${target_path}""",]script_runner = "@duckscript"