Flutter自定义库之四:三方库代码同步问题解决
小于 1 分钟
Flutter自定义库之四:三方库代码同步问题解决
以flutter_html库为例
flutter_html依赖官方webview库,所以当自定义了webview库之后,flutter_html对webview的依赖地址也必须更换,同时需要及时更新代码,这样就需要一个flutter_html的私有库,既能小部分修改,又可以保持代码同步
- 私有地址:git@git.koolearn-inc.com:android/flutter_html.git
- 官方地址:git@github.com:Sub6Resources/flutter_html.git
#
mkdir alipay_kit
git init
git remote add origin git@git.koolearn-inc.com:android/alipay_kit.git
touch README.md
git commit -m ""
git push -u origin master
git remote add github git@github.com:RxReader/alipay_kit.git
git fetch alipay_kit
git checkout -b github github/2.0.0
git checkout master
git merge github --allow-unrelated-histories
yaml文件需要添加的相关参数
name: webview_flutter_wkwebview
description: A Flutter plugin that provides a WebView widget based on Apple's WKWebView control.
repository: https://github.com/flutter/plugins/tree/master/packages/webview_flutter/webview_flutter_wkwebview
version: 2.7.1
homepage: http://git.koolearn-inc.com/android/flutter_plugins/tree/master/packages/webview_flutter/webview_flutter
publish_to: http://10.155.58.36:4000
authors: [leixun <leixun33@163.com>]
发布命令
flutter packages pub publish --server=http://10.155.58.36:4000 -v