'Gradle Exec - how to log commandline?

I am using Gradle to build my project. The build file contains several Exec tasks to run external programs (shell scripts and the Java Packager). The build is not always successful and I want to find out why. Analyzing all the output I have it feels strange that Gradle does not print the command that is getting invoked.

How can I make Gradle print the commandline before it starts executing?



Solution 1:[1]

You can use log levels of gradle

whenever you invoke gradle command you can do like this

./gradlew mytask --info //info logs
./gradlew mytask -s //to get stacktrace 

Ref: https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_logging https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_debugging

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 swapyonubuntu