Basic Gradle Commands

Logging options in Gradle

CommandDescription
–quite (or -q)Log errors only.
–debug (or -d)This option provides
a lot of output with information about the steps and classes used to run the
build.
–warn(or -w)Set log level to warn.Less verbose that debug
–info (or -i)To get a better insight into the steps that are executed for our task
–stacktrace (or -s)Print out the stacktrace for all exceptions.
–full-stacktrace
(or -S)
Print out the full (very verbose) stacktrace for all exceptions.
gradle -q task
gradle -i task
gradle -d task
gradle -qs task
gradle -is task
gradle -ds task
gradle -qS task
gradle -iS task
gradle -dS task

Help in gradle

gradle -q help 

Find details about task in gradle

gradle -q help --task <task_name>

List of tasks in gradle

gralde -q tasks

List of properties in Gradle

gradle -q properties

Running tasks without actually executing them (dry run)

With the help of –dry-run option or (-m) we can actually run the task without actually executing them, Gradle builds up a DAG(Direct Acyclic Graph) with all the task needed to be executed in that build

gradle --dry-run build
gradle -m build

Gradle Demon

Check status of Gradle Demon

gradle --status  //Status of Demin

Disabling Demon in gradle via properties file

org.gradle.daemon=false

Leave a Comment