构建脚本是基于远程依赖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.执行脚本,按提示输入即可