I know you can create a task like:
task 'test'(type: GradleBuild) {
tasks = ['test1','test2','test3']
}
to call multiple tasks from one but if I needed to call test1 twice but with different start parameters each time how would I do it?
I have tried:
task 'testA'(type: GradleBuild) {
doLast() {
tasks = ['test1']
startParameter.projectProperties = gradle.startParameter.projectProperties + ['param': 'A']
}
}
task 'testB'(type: GradleBuild) {
doLast() {
tasks = ['test1']
startParameter.projectProperties = gradle.startParameter.projectProperties + ['param': 'B']
}
}
task 'testZ'(type: GradleBuild) {
tasks = ['testA','testB']
}
But that yields:
* What went wrong:
Execution failed for task ':src:testB'.
> Included build <buildpath> has build path :src:src which is the same as included build <buildpath>
Does anyone have a solution for this?