2021-06-28 14:56:15 +00:00
|
|
|
extend = [
|
|
|
|
{ path = "scripts/makefile/desktop.toml" },
|
2021-07-04 15:31:33 +00:00
|
|
|
{ path = "scripts/makefile/protobuf.toml" },
|
2021-09-04 01:00:15 +00:00
|
|
|
{ path = "scripts/makefile/tests.toml" },
|
2021-10-06 07:23:38 +00:00
|
|
|
{ path = "scripts/makefile/docker.toml" },
|
2021-11-06 15:27:30 +00:00
|
|
|
{ path = "scripts/makefile/env.toml" },
|
2021-11-04 10:03:36 +00:00
|
|
|
{ path = "scripts/makefile/flutter.toml" },
|
2021-06-28 14:56:15 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[env]
|
|
|
|
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
|
|
|
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
|
|
|
|
CARGO_MAKE_CRATE_NAME = "dart-ffi"
|
2021-11-04 14:13:05 +00:00
|
|
|
VERSION = "0.0.1"
|
2021-11-06 14:35:45 +00:00
|
|
|
FEATURES = "flutter,http_server"
|
|
|
|
PRODUCT_NAME = "AppFlowy"
|
2021-11-04 08:00:08 +00:00
|
|
|
|
2021-11-04 14:13:05 +00:00
|
|
|
#CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html
|
2021-11-04 08:00:08 +00:00
|
|
|
[env.development-mac]
|
2021-06-28 14:56:15 +00:00
|
|
|
DEV = true
|
2021-11-04 08:00:08 +00:00
|
|
|
PROD = false
|
|
|
|
TARGET_OS = "macos"
|
2021-11-14 14:46:59 +00:00
|
|
|
RUST_COMPILE_TARGET = "x86_64-apple-darwin"
|
2021-11-04 14:13:05 +00:00
|
|
|
CRATE_TYPE = "cdylib"
|
2021-11-04 10:03:36 +00:00
|
|
|
BUILD_FLAG = "debug"
|
2021-11-04 14:13:05 +00:00
|
|
|
FLUTTER_PLATFORM = "macos"
|
2021-11-04 10:03:36 +00:00
|
|
|
FLUTTER_OUTPUT_DIR = "Debug"
|
2021-11-08 11:19:02 +00:00
|
|
|
FEATURES = "flutter"
|
2021-11-06 14:35:45 +00:00
|
|
|
PRODUCT_EXT = "app"
|
|
|
|
|
2021-11-04 08:00:08 +00:00
|
|
|
|
|
|
|
[env.production-mac]
|
|
|
|
DEV = false
|
|
|
|
PROD = true
|
|
|
|
TARGET_OS = "macos"
|
2021-11-14 14:46:59 +00:00
|
|
|
RUST_COMPILE_TARGET = "aarch64-apple-darwin"
|
2021-11-04 14:13:05 +00:00
|
|
|
CRATE_TYPE = "cdylib"
|
2021-11-04 10:03:36 +00:00
|
|
|
BUILD_FLAG = "release"
|
2021-11-04 14:13:05 +00:00
|
|
|
FLUTTER_PLATFORM = "macos"
|
2021-11-04 10:03:36 +00:00
|
|
|
FLUTTER_OUTPUT_DIR = "Release"
|
2021-11-06 14:35:45 +00:00
|
|
|
FEATURES = "flutter"
|
|
|
|
PRODUCT_EXT = "app"
|
2021-11-04 08:00:08 +00:00
|
|
|
|
|
|
|
[env.production-ios]
|
|
|
|
DEV = false
|
|
|
|
PROD = true
|
|
|
|
TARGET_OS = "ios"
|
2021-11-04 14:13:05 +00:00
|
|
|
CRATE_TYPE = "staticlib"
|
2021-11-04 10:03:36 +00:00
|
|
|
BUILD_FLAG = "release"
|
2021-11-04 14:13:05 +00:00
|
|
|
FLUTTER_PLATFORM = "ios"
|
2021-11-04 10:03:36 +00:00
|
|
|
FLUTTER_OUTPUT_DIR = "Release"
|
2021-11-06 14:35:45 +00:00
|
|
|
PRODUCT_EXT = "ipa"
|
2021-11-04 08:00:08 +00:00
|
|
|
|
|
|
|
[env.production-android]
|
|
|
|
DEV = false
|
|
|
|
PROD = true
|
|
|
|
TARGET_OS = "android"
|
2021-11-04 14:13:05 +00:00
|
|
|
CRATE_TYPE = "cdylib"
|
2021-11-04 10:03:36 +00:00
|
|
|
BUILD_FLAG = "release"
|
2021-11-04 14:13:05 +00:00
|
|
|
FLUTTER_PLATFORM = "apk"
|
2021-11-04 10:03:36 +00:00
|
|
|
FLUTTER_OUTPUT_DIR = "Release"
|
2021-11-06 14:35:45 +00:00
|
|
|
PRODUCT_EXT = "apk"
|
2021-11-04 08:00:08 +00:00
|
|
|
|
2021-11-14 12:17:31 +00:00
|
|
|
[env.production-window]
|
2021-11-04 08:00:08 +00:00
|
|
|
DEV = false
|
|
|
|
PROD = true
|
|
|
|
TARGET_OS = "windows"
|
2021-11-14 14:46:59 +00:00
|
|
|
RUST_COMPILE_TARGET = "x86_64-pc-windows-gnu"
|
2021-11-04 14:13:05 +00:00
|
|
|
CRATE_TYPE = "cdylib"
|
2021-11-04 10:03:36 +00:00
|
|
|
BUILD_FLAG = "release"
|
2021-11-14 12:17:31 +00:00
|
|
|
FLUTTER_PLATFORM = "windows"
|
2021-11-04 10:03:36 +00:00
|
|
|
FLUTTER_OUTPUT_DIR = "Release"
|
2021-11-06 14:35:45 +00:00
|
|
|
PRODUCT_EXT = "exe"
|
2021-06-28 14:56:15 +00:00
|
|
|
|
|
|
|
[tasks.setup-crate-type]
|
|
|
|
private = true
|
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
toml = readfile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml
|
2021-11-04 14:13:05 +00:00
|
|
|
val = replace ${toml} "rlib" ${CRATE_TYPE}
|
2021-06-28 14:56:15 +00:00
|
|
|
result = writefile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml ${val}
|
|
|
|
assert ${result}
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@duckscript"
|
|
|
|
|
|
|
|
[tasks.restore-crate-type]
|
|
|
|
private = true
|
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
toml = readfile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml
|
2021-11-04 14:13:05 +00:00
|
|
|
val = replace ${toml} ${CRATE_TYPE} "rlib"
|
2021-06-28 14:56:15 +00:00
|
|
|
result = writefile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml ${val}
|
|
|
|
assert ${result}
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@duckscript"
|