Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get rid of the Executing/Progress Bar when running a Gradle application?

Tags:

gradle

I am trying to build a console based application but whenver I run

./gradlew run

I get thr progress bar which looks like this:

<=========----> 75% EXECUTING [29s]

Is there anyway I can remove this bar (which hangs out until the application ends)? Or is there a better way to write console base applications with gradle?

The version is 4.3.1

like image 973
piperRyan Avatar asked Oct 07 '18 16:10

piperRyan


People also ask

How do I stop Gradle process?

Note that it requires you to have gradlew executable in the project directory (it's there by default when using Android Studio). After the installation you can find "Gradle Stop" button on Main Toolbar and inside Run Menu.

How do I run a clean build in gradlew?

To run a Gradle command, open a command window on the project folder and enter the Gradle command. Gradle commands look like this: On Windows: gradlew <task1> <task2> … ​ e.g. gradlew clean allTests.


Video Answer


2 Answers

You can configure the Gradle log format using console command line parameter, as described here : https://docs.gradle.org/current/userguide/command_line_interface.html#rich_console

Try with : ./gradlew run --console=plain

like image 108
M.Ricciuti Avatar answered Apr 28 '23 16:04

M.Ricciuti


Another way of doing this seems to be by setting the TERM environment variable to dumb.

Try TERM=dumb ./gradlew run

like image 45
compostus Avatar answered Apr 28 '23 15:04

compostus