¿Cómo puedo ejecutar una nueva tarea de gradle?
He creado una nueva tarea de gradle en build.gradle:
task callCL(type: Exec) {
println "hello"
commandLine './rerun.sh'
}
Que supone ejecutar rerun.sh:
#!/bin/bash
cucumber -f rerun --out rerun.txt
file="rerun.txt"
if [ -f "$file" ] then
cucumber @rerun.txt
rm $file
fi
Estoy usando IntelliJ como IDE. ¿Cómo puedo ejecutar esta tarea?
Intenté ejecutar en la consola zshell y obtuve este error:
gradle callCL zsh: comando no encontrado: gradle
Pero en el IDE uso gradle todo el tiempo, por lo que debe instalarse.
¿Cómo puedo arreglar esto? ¿Y mi escritura está bien?