Gradle Interferes on Terminal Interface when running

I have a complex build process of an application built with bash. One of the awesome features that the team which develop it add, is a step-by-step interface that runs completely on the terminal.

But before this build process start, it is necessary that gradle download a few maven artifacts that are going to be used. And one thing that I want to do, is to make gradle starts this terminal interface after download the artifacts. In order to achieve that, I created a task of type Exec, that once the build task was finalized, it would run this script.

The problem is that gradle keeps running during the execution of this terminal interface, and it interferes on the keyboard inputs that the terminal interface requires the users to use to select options. I’m only able to type “Enter”, other inputs make gradle writes stuff on the terminal.

I already found that I could hide everything gradle prints with the option -q, but I could not find a way to make gradle stops after calling this script (without killing the script execution) or to simply not interfere on these keyboards inputs that this terminal interface requires.

Any thoughts?

Thanks, and best regards