0
我在我的项目的根有一个“.gitlab-ci.yml”文件:配置gitlab CI为Android项目
job_build_debug_apk:
script:
- ./gradlew assembleRelease
stage: deploy
tags:
- android
allow_failure: true
,而我推到主,将建立并succesed,但我可以在我的项目中找到任何apk文件。
这是我的日志:
running with gitlab-ci-multi-runner 1.4.2 (bcc1794)
Using Shell executor...
Running on userMacBook-Pro.local...
Fetching changes...
Removing .gradle/
Removing app/build/
Removing build/
HEAD is now at 3ae32fc back back
From http://gitlab.xxx.com/naiyu/AdminYDT
3ae32fc..5312eaa master -> origin/master
Checking out 5312eaaf as master...
$ ./gradlew assembleRelease
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2340Library
:app:prepareComAndroidSupportAppcompatV72340Library
:app:prepareComAndroidSupportSupportV42340Library
:app:prepareComAndroidSupportSupportVectorDrawable2340Library
:app:prepareReleaseDependencies
:app:compileReleaseAidl
:app:compileReleaseRenderscript
:app:generateReleaseBuildConfig
:app:mergeReleaseShaders
:app:compileReleaseShaders
:app:generateReleaseAssets
:app:mergeReleaseAssets
:app:generateReleaseResValues
:app:generateReleaseResources
:app:mergeReleaseResources
:app:processReleaseManifest
:app:processReleaseResources
:app:generateReleaseSources
:app:incrementalReleaseJavaCompilationSafeguard
:app:compileReleaseJavaWithJavac
:app:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease
:app:prePackageMarkerForRelease
:app:transformClassesWithDexForRelease
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:app:mergeReleaseJniLibFolders
:app:transformNative_libsWithMergeJniLibsForRelease
:app:processReleaseJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForRelease
:app:packageRelease
:app:assembleRelease
BUILD SUCCESSFUL
Total time: 32.012 secs
Build succeeded
我的亚军执行是Shell
在我的Mac OS。
有没有我的路径有问题,或者是否有任何博客显示这一点。
此文章由Snapchat的Android开发人员编写,可能会帮助您:https://about.gitlab.com/2016/11/30/setting-up-gitlab-ci-for-android-projects/ 他解释了如何使用GitLab CI构建和测试Android应用程序,为'.gitlab-ci.yml'提供所需的代码,并将其分解成若干部分,逐一解释。 –
@ martijn-pieters我只是想帮忙,而且你没有给我时间来编辑我的答案。这太不公平了。 –