0

Flutter module upload aar to maven

 2 years ago
source link: https://gist.github.com/Vove7/cc0779d97d0cc807c53c4f847802dbf8
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Author

Vove7 commented on Mar 11, 2021

Usage:

in dir: ./script

create upload.sh:

#!/usr/bin/env sh

flutter pub get
cd ..
./gradlew build

cd .android

./gradlew \
  -I=../script/flutter_aar_upload.gradle \
  -Pmaven-url=http://your_maven_url \
  -Pmaven-user=admin \
  -Pmaven-pwd=admin123 \
  -Pis-plugin=false \
  -PbuildNumber=${pom-version} \
  -Ptarget-platform=android-arm,android-arm64,android-x64 assembleAarRelease

exec upload.sh

参数说明
-Pmaven-url 可以是本地路径,也可为远程地址
示例:
maven-url=file:///Users/xxx/StudioProjects/xxx/build/host
maven-url=http://192.168.1.100:8081/repository/maven-releases/

maven-user 与 maven-pwd 为maven远程用户及密码,若发布到本地无需设置

-PbuildNumber=1.0.0 为版本号

最后 assembleAarRelease 为打包类型,assembleAarDebug, assembleAarProfile


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK