安卓 打包 aab、apk

PATH=/Users/qa/tools/gradle/bin:/Users/qa/tools/android-sdk-mac_x86/build-tools/26.0.2
export JAVA_HOME=/Users/qa/tools/jdk/jdk-11.0.13.jdk/Contents/Home

function buildaab () {
  ${WORKSPACE}/gradlew clean
  # 生成 aab 包
  ${WORKSPACE}/gradlew bundleRelease
  cp build/outputs/bundle/release/*.aab output/
}


function buildapk () {
  ${WORKSPACE}/gradlew clean
  # 生成 apk 包
  ${WORKSPACE}/gradlew build -b build.gradle --S
  cp build/outputs/apk/release/*.apk output/
}


buildaab
buildapk

posted @ 2022-11-14 14:51  Star-Hitian  阅读(47)  评论(0编辑  收藏  举报