hi team,
Here is my project detail:
rootproject:
----build.gradle
----settings.gradle
----subproject1.gradle
----subproject2.gradle
…
subproject1
subproject2
…
I am trying to start my gradle build in jenkins, and I want spcific the projects I want to build on jenkins UI. Here is the UI:
I can get the parameters I set on the UI, then I want to use the parameters to invoke the specified subproject’s build task.
I wrote a task in rootproject’s build.gradle
task buildAll << {
def isBuildAEar = project.hasProperty(‘build_AEAR’) ? project.property(‘build_AEAR’): false;
if(isBuildAEar == ‘true’) {
// then I want to invoke the AEar’s build task here…
}
}
I tried different solutions but all failed, like:
project(‘AEar’).tasks[‘build’].execute
or use exec task to exceute gradle :AEar:build etc
Could anyone can help to give any adivce? Thank you very much.
Wales
2016-09-28