Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle 4.0 does not display executed tasks in command line

When I run gradle build or any other gradle command from terminal I can't see recently executed tasks and their status (for example :testClasses UP-TO-DATE), but only BUILD SUCCESSFUL:

Behaviour in command line

However everything is fine when I run build command from eclipse IDE using gradle plugin:

Behaviour in Eclipse IDE

I'm using Gradle 4.0. Any suggestions how to fix it?

like image 556
stepaklots Avatar asked Aug 25 '17 14:08

stepaklots


People also ask

How do I run a Gradle test from the command line?

You can do gradle -Dtest. single=ClassUnderTestTest test if you want to test single class or use regexp like gradle -Dtest. single=ClassName*Test test you can find more examples of filtering classes for tests under this link.

How do I view Gradle logs?

View -> Tool Windows -> Build. There is small "ab" button on the left panel. All gradle logs for current build are there.


1 Answers

I figured out the issue. If you execute gradle --help- you may notice the --console option in the options list which is responsible for output during gradle task execution. Since gradle v4.0 console option is set to rich by default which causes the output I get using terminal. Basically using --console=plain fixes the issue (for example: gradle --console=plain build).

like image 95
stepaklots Avatar answered Oct 10 '22 05:10

stepaklots