【发布时间】:2020-01-25 16:38:33
【问题描述】:
我有一个安卓项目。它有 2 种口味,分别名为 GooglePlay 和 Cafebazzar。
在使用 Android Studio 时,我看到了 assembleRelease 和 assembleCafeBazzar 和 assembleGooglePlay。
当我在 jenkins 中使用 ./gradlew -q tasks --all 时,我在我的任务中看不到 assembleRelease。
只是我看到了 assemble。
我使用 Jenkins 来构建项目。如何在 Jenkins 中看到 assembleRelease?
+ ./gradlew -q tasks --all
------------------------------------------------------------
Tasks runnable from root project
------------------------------------------------------------
Android tasks
-------------
app:sourceSets - Prints out all the source sets defined in this project.
core:sourceSets - Prints out all the source sets defined in this project.
skeleton:sourceSets - Prints out all the source sets defined in this project.
Build tasks
-----------
app:assemble - Assembles all variants of all applications and secondary packages.
core:assemble - Assembles all variants of all applications and secondary packages.
skeleton:assemble - Assembles all variants of all applications and secondary packages.
app:assembleAndroidTest - Assembles all the Test applications.
core:assembleAndroidTest - Assembles all the Test applications.
skeleton:assembleAndroidTest - Assembles all the Test applications.
app:build - Assembles and tests this project.
core:build - Assembles and tests this project.
skeleton:build - Assembles and tests this project.
app:buildDependents - Assembles and tests this project and all projects that depend on it.
core:buildDependents - Assembles and tests this project and all projects that depend on it.
skeleton:buildDependents - Assembles and tests this project and all projects that depend on it.
app:buildNeeded - Assembles and tests this project and all projects it depends on.
core:buildNeeded - Assembles and tests this project and all projects it depends on.
skeleton:buildNeeded - Assembles and tests this project and all projects it depends on.
app:clean - Deletes the build directory.
core:clean - Deletes the build directory.
skeleton:clean - Deletes the build directory.
app:cleanBuildCache - Deletes the build cache directory.
core:cleanBuildCache - Deletes the build cache directory.
skeleton:cleanBuildCache - Deletes the build cache directory.
【问题讨论】:
-
我们在 GitLab CI 中使用 Docker 执行器遇到了同样的问题。有消息吗?
标签: android android-studio jenkins gradle android-gradle-plugin