fix: iOS TestFlight issues (#3776)

* fix: transparent icons on iOS platform

* fix: remove unused unit tests

* chore: update flutter version

* feat: support building release packages for iOS and Android

* fix: integration test failed randomly

* chore: remove windows CI cache

* chore: update info.plist

* feat: build iOS and Android in Release mode

* chore: update editor version

* chore: don't cache flutter when testing

* chore: run unit test on Windwos
This commit is contained in:
Lucas.Xu
2023-10-25 23:33:46 +08:00
committed by GitHub
parent 48582cb718
commit 147637fcf5
37 changed files with 143 additions and 284 deletions

View File

@ -42,6 +42,26 @@ run_task = { name = [
] }
script_runner = "@shell"
[tasks.appflowy-ios]
dependencies = ["appflowy-core-dev-ios"]
run_task = { name = [
"code_generation",
"set-app-version",
"flutter-build-ios",
"copy-to-product-mobile",
] }
script_runner = "@shell"
[tasks.appflowy-android]
dependencies = ["appflowy-core-dev-android"]
run_task = { name = [
"code_generation",
"set-app-version",
"flutter-build-android",
"copy-to-product-mobile",
] }
script_runner = "@shell"
[tasks.appflowy-dev]
mac_alias = "appflowy-macos-dev"
windows_alias = "appflowy-windows-dev"
@ -95,18 +115,30 @@ run_task = { name = [
script_runner = "@shell"
[tasks.appflowy-make-product-dev]
run_task = { name = [
"set-app-version",
"flutter-build",
"copy-to-product",
] }
run_task = { name = ["set-app-version", "flutter-build", "copy-to-product"] }
[tasks.copy-to-product]
mac_alias = "copy-to-product-macos"
windows_alias = "copy-to-product-windows"
linux_alias = "copy-to-product-linux"
[tasks.copy-to-product-mobile]
script = [
"""
product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/product/${APP_VERSION}
output_path=${product_path}/${TARGET_OS}/${FLUTTER_OUTPUT_DIR}
if [ -d "${output_path}" ]; then
rm -rf ${output_path}/
fi
mkdir -p ${output_path}
product=${PRODUCT_NAME}.${PRODUCT_EXT}
cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/build/${TARGET_OS}/Build/Products/${FLUTTER_OUTPUT_DIR}/${product} \
${output_path}/${product}
""",
]
script_runner = "@shell"
[tasks.copy-to-product-macos]
script = [
"""
@ -200,6 +232,7 @@ script = [
script = ["""
cd appflowy_flutter/
flutter pub get
flutter packages pub get
flutter build ${TARGET_OS} --${BUILD_FLAG} --verbose
"""]
script_runner = "@shell"
@ -221,38 +254,36 @@ script = ["""
script_runner = "@shell"
[tasks.flutter-build.windows]
script = ["""
script = [
"""
cd appflowy_flutter
exec cmd.exe /c flutter pub get
exec cmd.exe /c flutter build ${TARGET_OS} --${BUILD_FLAG} --build-name=${APP_VERSION}
"""]
""",
]
script_runner = "@duckscript"
[tasks.code_generation]
script_runner = "@shell"
script = [
"""
script = ["""
cd appflowy_flutter
flutter clean
flutter pub get
flutter packages pub get
flutter packages pub get
cd ../
sh scripts/code_generation/generate.sh -s
"""
]
sh scripts/code_generation/generate.sh
"""]
[tasks.code_generation.windows]
script_runner = "@duckscript"
script = [
"""
script = ["""
cd ./appflowy_flutter/
exec cmd.exe /c flutter clean
exec cmd.exe /c flutter pub get
exec cmd.exe /c flutter packages pub get
cd ../
exec scripts/code_generation/generate.cmd
""",
]
"""]
[tasks.dry_code_generation]
script_runner = "@shell"

View File

@ -28,10 +28,10 @@ script = [
rustup show
if [ "${BUILD_FLAG}" == "debug" ]; then
echo "🚀 🚀 🚀 Building for debug"
cargo lipo --targets ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}"
cargo lipo --targets ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES} --package=dart-ffi "
else
echo "🚀 🚀 🚀 Building for release"
cargo lipo --targets ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" --release
cargo lipo --release --targets ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi
fi
cd ../
""",
@ -54,8 +54,13 @@ script = [
"""
cd rust-lib/
rustup show
echo "cargo ndk -t arm64-v8a -t x86_64 -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}""
cargo ndk -t arm64-v8a -t x86_64 -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}"
if [ "${BUILD_FLAG}" == "debug" ]; then
echo "🚀 🚀 🚀 Building for debug"
cargo ndk -t arm64-v8a -t x86_64 -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi
else
echo "🚀 🚀 🚀 Building for release"
cargo ndk -t arm64-v8a -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi --release
fi
cd ../
""",
]