AppFlowy/Makefile.toml

96 lines
2.4 KiB
Makefile
Raw Normal View History

extend = [
{ path = "scripts/makefile/desktop.toml" },
{ 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" },
{ path = "scripts/makefile/flutter.toml" },
]
[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]
DEV = true
2021-11-04 08:00:08 +00:00
PROD = false
TARGET_OS = "macos"
2021-11-13 07:20:17 +00:00
DEPLOY_TARGET = "x86_64-apple-darwin"
2021-11-04 14:13:05 +00:00
CRATE_TYPE = "cdylib"
BUILD_FLAG = "debug"
2021-11-04 14:13:05 +00:00
FLUTTER_PLATFORM = "macos"
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-13 07:20:17 +00:00
DEPLOY_TARGET = "aarch64-apple-darwin"
2021-11-04 14:13:05 +00:00
CRATE_TYPE = "cdylib"
BUILD_FLAG = "release"
2021-11-04 14:13:05 +00:00
FLUTTER_PLATFORM = "macos"
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"
BUILD_FLAG = "release"
2021-11-04 14:13:05 +00:00
FLUTTER_PLATFORM = "ios"
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"
BUILD_FLAG = "release"
2021-11-04 14:13:05 +00:00
FLUTTER_PLATFORM = "apk"
FLUTTER_OUTPUT_DIR = "Release"
2021-11-06 14:35:45 +00:00
PRODUCT_EXT = "apk"
2021-11-04 08:00:08 +00:00
[env.production-win]
DEV = false
PROD = true
TARGET_OS = "windows"
2021-11-04 14:13:05 +00:00
CRATE_TYPE = "cdylib"
BUILD_FLAG = "release"
2021-11-04 14:13:05 +00:00
FLUTTER_PLATFORM = "apk"
FLUTTER_OUTPUT_DIR = "Release"
2021-11-06 14:35:45 +00:00
PRODUCT_EXT = "exe"
[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}
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"
result = writefile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml ${val}
assert ${result}
""",
]
script_runner = "@duckscript"