Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Latest commit

 

History

History
63 lines (40 loc) · 2.4 KB

flutter_build_script.md

File metadata and controls

63 lines (40 loc) · 2.4 KB

iOS远程依赖flutter module构建脚本

构建脚本是基于远程依赖Flutter Module组件库编译产物 方案0x05实现的,但同样适用于远程依赖Flutter Module组件库编译产物(升级版 )

脚本内容详见flutter_build_script.sh 文件,脚本的大致流程如图所示。

实现功能

  • 校验git是否有未提交的更新
  • git commit, git tag ,git push等一系列git操作
  • 校验.ios/Runner.xcworkspace
  • 编译Flutter module,导出framework
  • 选择debug / profile / release 编译模式
  • 版本号自增 或 手动输入
  • 修改podspec版本号
  • 钉钉通知
  • 杂七杂八的结果校验
  • xcframework黑名单,过滤掉重复依赖的framwork,用来解决问题内嵌依赖的xcframework和pod依赖的第三方库重复冲突,新版Xcode编译失败

使用

1.修改这几个本地仓库的路径

readonly workspace_root_path="$HOME/Desktop/workspace"
readonly flutter_module_path="${workspace_root_path}/flutter_notes/flutter_module"
readonly flutter_build_output_path="${workspace_root_path}/futter_build_tmp"
readonly flutter_module_sdk_podspec_path="${workspace_root_path}/flutter_module_sdk_podspec"
readonly flutter_app_sdk_path="${workspace_root_path}/flutter_app_sdk"
readonly flutter_plugin_sdk_path="${workspace_root_path}/flutter_plugin_sdk"

readonly app_sdk_podspec_path="$flutter_module_sdk_podspec_path/FlutterAppSDK.podspec"
readonly plugin_sdk_podspec_path="$flutter_module_sdk_podspec_path/FlutterPluginSDK.podspec"

2.修改黑名单,不需要黑名单就清空

blacklist=(
"FMDB.xcframework"
"MMKV.xcframework"
"MMKVCore.xcframework"
"Sentry.xcframework"
)

3.执行脚本,按提示输入即可

参考