简介
接下来,我们来看一下开发完lrn后应该如何发布。
Android
TIP
Android最终产物为aar包
- 更改版本号
bash
vim lrn-android/lzy-react-native/build.gradle
version = '0.1.21'
- 清除build目录缓存
bash
./gradlew clean
- 发布到
SONATYPE NEXUS
中
bash
./gradlew publishReleasePublicationToLzyAndroidRepository
- 查看发布的产物
iOS
TIP
iOS最终产物为Framework
- 更新版本号
bash
vim lrn-ios/LZYReactNative.podspec
s.version = '0.1.21'
- 打tag
bash
git tag v0.1.21
git push --tags
- 执行命令发布到私有仓库
bash
pod repo push LZYPodspecs LZYReactNative.podspec --verbose --use-libraries --allow-warnings --use-modular-headers --use-json --skip-tests --skip-import-validation
- 查看发布的产物