android studio - Task 'build' not found in root project 'workspace'. Some candidates are: 'build' -
i unable build project using gradle 2.10, have tried different versions issue same.
i using jenkins 2.10 version. same project can build android studio.
can 1 me jenkins configuration, have defined sdk path, have gradle plugin etc.
[error] [org.gradle.buildexceptionreporter] failure: build failed exception. [error] [org.gradle.buildexceptionreporter] * went wrong: [error] [org.gradle.buildexceptionreporter] task 'built' not found in root project 'workspace'. candidates are: 'build'. * try: [error] [org.gradle.buildexceptionreporter] run gradle tasks list of available tasks. 20:11:26.063 [error] [org.gradle.buildexceptionreporter] * exception is: 20:11:26.063 [error] [org.gradle.buildexceptionreporter] org.gradle.execution.taskselectionexception: task 'built' not found in root project 'workspace'. candidates are: 'build'.
i have added attached step in build, need add steps building ?
there's no built task, try build, should solve problem.
however, it's practice parametrize job, can use assembledebug , assemblerelease tasks. way can trigger builds automated integration tests , builds production separately without having duplicate jobs.
define parameters using parametrized trigger plugin.
example of parameters usage in gradle tasks area:
$build_profile -pkeystore_path=$signing_keystore_path -pkeystore_alias=$keystore_alias -pkeystore_password=$signing_password
in build.gradle file can add section:
signingconfigs { release { storefile file(getpropertyfrombuildcommand("keystore_path")) storepassword getpropertyfrombuildcommand("keystore_password") keyalias getpropertyfrombuildcommand("keystore_alias") keypassword getpropertyfrombuildcommand("keystore_password") } } buildtypes { release { minifyenabled true shrinkresources true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' signingconfig signingconfigs.release } }
this if set produce command example:
gradle assemblerelease -pkeystore_alias=prodkey -pkeystore_path=/home/jenkins/my-prod-keys.jks -pkeystore_password=yourpassword
this build signed apk production , submission on google play store can use flexible publish or conditional build step branch build flows.
Comments
Post a Comment