在詹金斯的任务gradle中找不到汇编版本

问题描述 投票:2回答:1

我有一个android项目。它有2种口味,分别是GooglePlay和Cafebazzar。

[使用Android Studio时,我看到assembleRelease和assembleCafeBazzar以及assembleGooglePlay。

 jenkins

当我在詹金斯中使用./ gradlew -q任务--all时,在任务中看不到assembleRelease。我看到组装。我使用詹金斯(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.
android android-studio jenkins gradle android-gradle-plugin
1个回答
0
投票

当我检出我的项目“ assembleRelease”不能作为任务使用时,我有同样的问题。当我在Android Studio中打开项目并选择“与gradle同步”时,会有一些活动,之后我可以从命令行执行“ gradlew assembleRelease”。

我不知道“与gradle同步”到底是做什么的。似乎有一个命令曾经执行过类似的操作,但似乎不再可用。

© www.soinside.com 2019 - 2024. All rights reserved.