AppFlowy/frontend/Makefile.toml

264 lines
7.3 KiB
Makefile
Raw Normal View History

2021-11-15 07:53:08 +00:00
#https://github.com/sagiegurari/cargo-make
extend = [
{ path = "scripts/makefile/desktop.toml" },
{ path = "scripts/makefile/protobuf.toml" },
{ path = "scripts/makefile/tests.toml" },
{ path = "scripts/makefile/docker.toml" },
{ path = "scripts/makefile/env.toml" },
{ path = "scripts/makefile/flutter.toml" },
{ path = "scripts/makefile/tool.toml" },
{ path = "scripts/makefile/tauri.toml" },
]
2022-03-07 00:30:59 +00:00
[config]
on_error_task = "catch"
[tasks.catch]
2022-09-18 01:30:59 +00:00
run_task = { name = ["restore-crate-type"] }
2022-03-07 00:30:59 +00:00
[env]
RUST_LOG = "info"
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
CARGO_MAKE_CRATE_NAME = "dart-ffi"
2022-02-19 08:48:57 +00:00
LIB_NAME = "dart_ffi"
chore: merge remote-tracking branch 'main' into develop (#2530) * feat: show unscheduled events in calendar toolbar (#2411) * refactor: use same show row detail function * fix: adjust popover offset * feat: show unscheduled events in toolbar * chore: apply suggestions from Xazin * refactor: refactor list item into separate widget --------- Co-authored-by: Nathan.fooo <86001920+appflowy@users.noreply.github.com> * fix: default include time (#2444) * fix: default include time * chore: clarify logic and add comments * chore: bump version 0.1.4 (#2455) * chore: Update README.md Update product screenshots * fix: wrong day of week (#2468) * feat: select which properties to show in calendar (#2482) * feat: improve sidebar item dragged appearance (#2471) * fix: show delete icon for document icon properly (#2475) * feat: add hover effect on an event card (#2487) * chore: delete unncessary openCard method in RowCardContainer * chore: delete unnessary code and add comment * chore: update editor v0.1.12 and format the readme (#2489) * fix: number sort (#2507) * bump version 0.1.5 (#2506) * chore: bump version 0.1.5 * fix: could not trigger slash menu after inserting an emoji * Revert "feat: add hover effect on an event card (#2487)" This reverts commit f0a4b4b77d9e88637dd04a4a2377396b825f2b94. * feat: add hover effect on an event card * fix: #2469 duplicated cover * chore: update changelog.md (#2510) * chore: Update README.md Add a screenshot of the calendar view * fix: some regressions --------- Co-authored-by: Nathan.fooo <86001920+appflowy@users.noreply.github.com> Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io> Co-authored-by: Annie <anqi.annie.wang@gmail.com> Co-authored-by: Yijing Huang <hyj891204@gmail.com>
2023-05-15 03:18:08 +00:00
CURRENT_APP_VERSION = "0.1.5"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite"
2021-11-06 14:35:45 +00:00
PRODUCT_NAME = "AppFlowy"
# CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html
# If you update the macOS's CRATE_TYPE, don't forget to update the
# appflowy_backend.podspec
# for staticlib:
# s.static_framework = true
# s.vendored_libraries = "libdart_ffi.a"
# for cdylib:
# s.vendored_libraries = "libdart_ffi.dylib"
#
# Remember to update the ffi.dart:
# for staticlib:
# if (Platform.isMacOS) return DynamicLibrary.open('${prefix}/libdart_ffi.a');
# for cdylib:
# if (Platform.isMacOS) return DynamicLibrary.open('${prefix}/libdart_ffi.dylib');
CRATE_TYPE = "staticlib"
LIB_EXT = "a"
2021-12-05 08:39:41 +00:00
APP_ENVIRONMENT = "local"
FLUTTER_FLOWY_SDK_PATH = "appflowy_flutter/packages/appflowy_backend"
2023-01-24 06:01:30 +00:00
TAURI_BACKEND_SERVICE_PATH = "appflowy_tauri/src/services/backend"
# Test default config
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "dylib"
TEST_BUILD_FLAG = "debug"
TEST_COMPILE_TARGET = "x86_64-apple-darwin"
2021-11-15 07:53:08 +00:00
2022-05-30 12:48:28 +00:00
[env.development-mac-arm64]
RUST_LOG = "info"
TARGET_OS = "macos"
RUST_COMPILE_TARGET = "aarch64-apple-darwin"
BUILD_FLAG = "debug"
FLUTTER_OUTPUT_DIR = "Debug"
PRODUCT_EXT = "app"
BUILD_ARCHS = "arm64"
CRATE_TYPE = "staticlib"
2022-05-30 12:48:28 +00:00
[env.development-mac-x86_64]
2022-04-12 03:13:35 +00:00
RUST_LOG = "info"
2021-11-04 08:00:08 +00:00
TARGET_OS = "macos"
2021-11-14 14:46:59 +00:00
RUST_COMPILE_TARGET = "x86_64-apple-darwin"
BUILD_FLAG = "debug"
FLUTTER_OUTPUT_DIR = "Debug"
2021-11-06 14:35:45 +00:00
PRODUCT_EXT = "app"
BUILD_ARCHS = "x86_64"
CRATE_TYPE = "staticlib"
2021-11-06 14:35:45 +00:00
2022-05-30 12:48:28 +00:00
[env.production-mac-arm64]
2021-11-15 07:53:08 +00:00
BUILD_FLAG = "release"
2021-11-04 08:00:08 +00:00
TARGET_OS = "macos"
2021-11-14 14:46:59 +00:00
RUST_COMPILE_TARGET = "aarch64-apple-darwin"
FLUTTER_OUTPUT_DIR = "Release"
2021-11-06 14:35:45 +00:00
PRODUCT_EXT = "app"
2021-12-05 08:39:41 +00:00
APP_ENVIRONMENT = "production"
BUILD_ARCHS = "arm64"
CRATE_TYPE = "staticlib"
2021-11-04 08:00:08 +00:00
2022-05-30 12:48:28 +00:00
[env.production-mac-x86_64]
BUILD_FLAG = "release"
2021-11-15 07:53:08 +00:00
TARGET_OS = "macos"
RUST_COMPILE_TARGET = "x86_64-apple-darwin"
FLUTTER_OUTPUT_DIR = "Release"
2021-11-15 07:53:08 +00:00
PRODUCT_EXT = "app"
2021-12-05 08:39:41 +00:00
APP_ENVIRONMENT = "production"
BUILD_ARCHS = "x86_64"
CRATE_TYPE = "staticlib"
2021-11-17 06:17:46 +00:00
2021-11-23 09:45:18 +00:00
[env.development-windows-x86]
2021-11-17 06:17:46 +00:00
TARGET_OS = "windows"
RUST_COMPILE_TARGET = "x86_64-pc-windows-msvc"
BUILD_FLAG = "debug"
FLUTTER_OUTPUT_DIR = "Debug"
PRODUCT_EXT = "exe"
2021-11-17 09:52:49 +00:00
CRATE_TYPE = "cdylib"
LIB_EXT = "dll"
2021-11-17 06:17:46 +00:00
2021-11-23 09:45:18 +00:00
[env.production-windows-x86]
BUILD_FLAG = "release"
2021-11-04 08:00:08 +00:00
TARGET_OS = "windows"
2021-11-17 06:17:46 +00:00
RUST_COMPILE_TARGET = "x86_64-pc-windows-msvc"
FLUTTER_OUTPUT_DIR = "Release"
2021-11-06 14:35:45 +00:00
PRODUCT_EXT = "exe"
2021-11-17 09:52:49 +00:00
CRATE_TYPE = "cdylib"
LIB_EXT = "dll"
2021-12-05 08:39:41 +00:00
APP_ENVIRONMENT = "production"
2022-07-08 00:30:58 +00:00
[env.development-linux-x86_64]
TARGET_OS = "linux"
RUST_COMPILE_TARGET = "x86_64-unknown-linux-gnu"
BUILD_FLAG = "debug"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Debug"
LIB_EXT = "so"
LINUX_ARCH = "x64"
2022-07-08 00:30:58 +00:00
[env.production-linux-x86_64]
BUILD_FLAG = "release"
TARGET_OS = "linux"
RUST_COMPILE_TARGET = "x86_64-unknown-linux-gnu"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Release"
LIB_EXT = "so"
LINUX_ARCH = "x64"
2021-12-05 08:39:41 +00:00
APP_ENVIRONMENT = "production"
[env.development-linux-aarch64]
TARGET_OS = "linux"
RUST_COMPILE_TARGET = "aarch64-unknown-linux-gnu"
BUILD_FLAG = "debug"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Debug"
LIB_EXT = "so"
LINUX_ARCH = "arm64"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite,openssl_vendored"
2021-11-19 09:34:49 +00:00
[env.production-linux-aarch64]
BUILD_FLAG = "release"
TARGET_OS = "linux"
RUST_COMPILE_TARGET = "aarch64-unknown-linux-gnu"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Release"
LIB_EXT = "so"
LINUX_ARCH = "arm64"
2021-12-05 08:39:41 +00:00
APP_ENVIRONMENT = "production"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite,openssl_vendored"
2021-11-19 09:34:49 +00:00
2021-11-15 07:53:08 +00:00
[tasks.echo_env]
2022-09-18 01:30:59 +00:00
script = ['''
2021-11-23 07:30:08 +00:00
echo "-------- Env Parameters --------"
echo CRATE_TYPE: ${CRATE_TYPE}
2021-11-15 07:53:08 +00:00
echo BUILD_FLAG: ${BUILD_FLAG}
echo TARGET_OS: ${TARGET_OS}
echo RUST_COMPILE_TARGET: ${RUST_COMPILE_TARGET}
echo FEATURES: ${FLUTTER_DESKTOP_FEATURES}
2021-11-15 07:53:08 +00:00
echo PRODUCT_EXT: ${PRODUCT_EXT}
2021-12-05 08:39:41 +00:00
echo APP_ENVIRONMENT: ${APP_ENVIRONMENT}
2021-11-15 07:53:08 +00:00
echo ${platforms}
echo ${BUILD_ARCHS}
2022-09-18 01:30:59 +00:00
''']
2021-11-23 07:30:08 +00:00
script_runner = "@shell"
2021-11-15 07:53:08 +00:00
[env.production-ios]
BUILD_FLAG = "release"
TARGET_OS = "ios"
FLUTTER_OUTPUT_DIR = "Release"
PRODUCT_EXT = "ipa"
[env.development-android]
BUILD_FLAG = "debug"
TARGET_OS = "android"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Debug"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite,openssl_vendored"
2022-09-18 01:30:59 +00:00
[env.production-android]
BUILD_FLAG = "release"
TARGET_OS = "android"
CRATE_TYPE = "cdylib"
FLUTTER_OUTPUT_DIR = "Release"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite,openssl_vendored"
2021-11-15 07:53:08 +00:00
[tasks.setup-crate-type]
private = true
script = [
"""
toml = readfile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml
val = replace ${toml} "staticlib" ${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
val = replace ${toml} ${CRATE_TYPE} "staticlib"
result = writefile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml ${val}
assert ${result}
""",
]
script_runner = "@duckscript"
[env.test-macos-x86_64]
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "dylib"
# For the moment, the DynamicLibrary only supports open x86_64 architectures binary.
TEST_COMPILE_TARGET = "x86_64-apple-darwin"
[env.test-macos-arm64]
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "dylib"
TEST_COMPILE_TARGET = "aarch64-apple-darwin"
[env.test-linux]
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "so"
TEST_COMPILE_TARGET = "x86_64-unknown-linux-gnu"
[env.test-windows]
TEST_CRATE_TYPE = "cdylib"
TEST_LIB_EXT = "dll"
TEST_COMPILE_TARGET = "x86_64-pc-windows-msvc"
[tasks.setup-test-crate-type]
private = true
script = [
"""
toml = readfile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml
val = replace ${toml} "staticlib" ${TEST_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-test-crate-type]
private = true
script = [
"""
toml = readfile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml
val = replace ${toml} ${TEST_CRATE_TYPE} "staticlib"
result = writefile ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/Cargo.toml ${val}
assert ${result}
""",
]
script_runner = "@duckscript"
[tasks.test-build]
2022-09-18 01:30:59 +00:00
condition = { env_set = ["FLUTTER_FLOWY_SDK_PATH"] }
script = ["""
2022-02-16 02:00:31 +00:00
cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/flowy-net
cargo build -vv --features=dart
2022-09-18 01:30:59 +00:00
"""]
script_runner = "@shell"