I have 2 tasks created in my build.gradle. When I run the task 'remoteCopy' it runs through fine. When I run a tasks which is dependent on 'remoteCopy' I get the below error:
Executing task ':importDump' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:importDump FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':importDump'.
> execCommand == null!
Any pointers to what I'm doing wrong. The build.gradle is given below:
**
- build.gradle
**
task remoteCopy(type: Exec) {
workingDir '/workspace/anivash.mutham/R10_CommercePlatform_DEV/buildtools/scripts'
commandLine './remotecopy.sh'
}
task importDump(dependsOn: remoteCopy,type:Exec) << {
workingDir '/workspace/anivash.mutham/R10_CommercePlatform_DEV/buildtools/scripts'
commandLine './importdump.sh'
}
The "importDump" task declaration is not valid, you have to move workingDir
and commandLine
out of the << { }
/doLast { }
block, as they are properties of the Exec task.
Try this one:
task importDump(dependsOn: remoteCopy, type: Exec) {
workingDir '/workspace/anivash.mutham/R10_CommercePlatform_DEV/buildtools/scripts'
commandLine './importdump.sh'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With