mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[flutter]: update build script
This commit is contained in:
parent
118219e5b3
commit
0e8ebe1e4d
@ -20,7 +20,7 @@ PRODUCT_NAME = "AppFlowy"
|
||||
DEV = true
|
||||
PROD = false
|
||||
TARGET_OS = "macos"
|
||||
DESKTOP_TARGET = "x86_64-apple-darwin"
|
||||
DEPLOY_TARGET = "x86_64-apple-darwin"
|
||||
CRATE_TYPE = "cdylib"
|
||||
BUILD_FLAG = "debug"
|
||||
FLUTTER_PLATFORM = "macos"
|
||||
@ -33,7 +33,7 @@ PRODUCT_EXT = "app"
|
||||
DEV = false
|
||||
PROD = true
|
||||
TARGET_OS = "macos"
|
||||
DESKTOP_TARGET = "x86_64-apple-darwin"
|
||||
DEPLOY_TARGET = "aarch64-apple-darwin"
|
||||
CRATE_TYPE = "cdylib"
|
||||
BUILD_FLAG = "release"
|
||||
FLUTTER_PLATFORM = "macos"
|
||||
|
@ -2,4 +2,7 @@
|
||||
#target-dir = "./bin"
|
||||
|
||||
[target.x86_64-apple-darwin]
|
||||
rustflags=["-C", "link-arg=-mmacosx-version-min=10.11"]
|
||||
|
||||
[target.aarch64-apple-darwin]
|
||||
rustflags=["-C", "link-arg=-mmacosx-version-min=10.11"]
|
@ -18,9 +18,9 @@ script = [
|
||||
cd rust-lib/
|
||||
if [ ${PROD} == true ]
|
||||
then
|
||||
cargo build --${BUILD_FLAG} --package=dart-ffi --target ${DESKTOP_TARGET} --features=${FEATURES}
|
||||
cargo build --${BUILD_FLAG} --package=dart-ffi --target ${DEPLOY_TARGET} --features=${FEATURES}
|
||||
else
|
||||
cargo build --package=dart-ffi --target ${DESKTOP_TARGET} --features=${FEATURES}
|
||||
cargo build --package=dart-ffi --target ${DEPLOY_TARGET} --features=${FEATURES}
|
||||
fi
|
||||
cd ../
|
||||
""",
|
||||
@ -33,7 +33,7 @@ condition = { platforms = ["mac"] }
|
||||
script = [
|
||||
"""
|
||||
echo "🚀 🚀 🚀 Flowy-SDK build success"
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/x86_64-apple-darwin/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib \
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${DEPLOY_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
|
||||
""",
|
||||
"""
|
||||
@ -51,7 +51,7 @@ script = [
|
||||
# post the dylib target_path that use for flutter unit test
|
||||
target_path = set ${TMPDIR}/appflowy_client/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib
|
||||
rm ${target_path}
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/x86_64-apple-darwin/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib ${target_path}
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${DEPLOY_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib ${target_path}
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
||||
|
Loading…
Reference in New Issue
Block a user