Jenkins打包Android apk记录

构建

Freestyle project -> 构建 -> Execute shell

cd app
chmod +x ../gradlew
../gradlew clean assembleDefaultDebug assembleDefaultRelease assembleDevelopDebug assembleDevelopRelease --stacktrace
cd app
chmod +x ../gradlew
../gradlew clean assembleGooglePlayDebug assembleGooglePlayRelease assembleHomeRelease assembleUpdateRelease assembleTencentRelease assembleWandoujiaRelease assembleHuaweiRelease assembleXiaomiRelease assembleVivoRelease assembleOppoRelease

gradlew配置代理

在gradlew的同一目录,编辑gradle.properties

systemProp.http.proxyHost=192.168.16.28
systemProp.http.proxyPort=8118
systemProp.https.proxyHost=192.168.16.28
systemProp.https.proxyPort=8118

参考:http://stackoverflow.com/questions/8938994/gradlew-behind-a-proxy

Task not found

Task 'assembleXXXDebug' not found in project ':app'.

参考:https://stackoverflow.com/questions/49187670/assembledebug-task-not-found-while-running-from-jenkins

I fixed the "task 'assembleDebug' not found in root project" error by adding an ANDROID_HOME environment variable

Manage Jenkins -> Configure System -> Environment variables -> 新增键值对

  • ANDROID_HOME (/data/Android/Android-Sdk/)

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/18/jenkins-package-android-apk-records/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Jenkins打包Android apk记录
构建 Freestyle project -> 构建 -> Execute shell cd app chmod +x ../gradlew ../gradlew clean assembleDefaultDebug assembleDefaultRelease assem……
<<上一篇
下一篇>>
文章目录
关闭
目 录