|
...
|
...
|
@@ -4,6 +4,7 @@ build_ios=false |
|
|
|
build_android=false
|
|
|
|
build_release=false
|
|
|
|
build_debug=false
|
|
|
|
build_ios_simulator=false
|
|
|
|
|
|
|
|
updatePodfile(){
|
|
|
|
if [ "$build_ios" == true ] && [ -d ".ios" ]; then
|
|
...
|
...
|
@@ -56,12 +57,17 @@ checkSDKDir() { |
|
|
|
|
|
|
|
buildIOSSDk() {
|
|
|
|
echo "\033[33mBegin Build iOS SDK\033[0m"
|
|
|
|
ios_framework_arch_options="--xcframework --no-universal"
|
|
|
|
if [[ "$build_ios_simulator" == true ]]; then
|
|
|
|
# XCFramework 同时包含真机与 ios-arm64_x86_64-simulator 架构。
|
|
|
|
ios_framework_arch_options="--xcframework"
|
|
|
|
fi
|
|
|
|
if [[ "$build_release" == true ]]; then
|
|
|
|
flutter build ios-framework --no-debug --no-profile --xcframework --no-universal --output=./
|
|
|
|
flutter build ios-framework --no-debug --no-profile $ios_framework_arch_options --output=./
|
|
|
|
mv ./Release/* ./SDK/iOS_SDK
|
|
|
|
rm -rf ./Release
|
|
|
|
else
|
|
|
|
flutter build ios-framework --no-release --no-profile --xcframework --no-universal --output=./
|
|
|
|
flutter build ios-framework --no-release --no-profile $ios_framework_arch_options --output=./
|
|
|
|
mv ./Debug/* ./SDK/iOS_SDK
|
|
|
|
rm -rf ./Debug
|
|
|
|
fi
|
|
...
|
...
|
@@ -85,7 +91,7 @@ buildAndroidSDK() { |
|
|
|
echo "\033[33mAndroid SDK Done\033[0m"
|
|
|
|
}
|
|
|
|
|
|
|
|
while getopts ":iard" optname; do
|
|
|
|
while getopts ":iards" optname; do
|
|
|
|
case "$optname" in
|
|
|
|
"i")
|
|
|
|
build_ios=true
|
|
...
|
...
|
@@ -99,6 +105,9 @@ while getopts ":iard" optname; do |
|
|
|
"d")
|
|
|
|
build_debug=true
|
|
|
|
;;
|
|
|
|
"s")
|
|
|
|
build_ios_simulator=true
|
|
|
|
;;
|
|
|
|
":")
|
|
|
|
echo "\033[31mNo argument value for option $OPTARG\033[0m"
|
|
|
|
;;
|
|
...
|
...
|
@@ -121,7 +130,8 @@ fi |
|
|
|
echo """\033[36m
|
|
|
|
Build iOS / Android: ($build_ios / $build_android)
|
|
|
|
Build All Platform: $all_platform
|
|
|
|
Build Release: $build_release\033[0m
|
|
|
|
Build Release: $build_release
|
|
|
|
Include iOS Simulator: $build_ios_simulator\033[0m
|
|
|
|
"""
|
|
|
|
|
|
|
|
checkSDKDir
|
...
|
...
|
|