I want to call an external ant script from gradle build. But I am getting
org.gradle.process.internal.ExecException: A problem occurred starting process 'command ‘ant’.
Caused by: java.io.IOException: Cannot run program “ant” (in directory “C:\Users\rajesh\eclipseworkspace\Sample7”): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
Though I am able to execute the same ant command outside gradle from a commandline.
task printHello(type: Exec){
executable “ant”
args “build.xml”
workingDir projectDir }
build.xml just contains echo hello world message.