Section: Gradle (1)
Updated: 08/10/2019
Page Index


gradle - build automation tool  


gradle [option...] [task...]  


Gradle is build automation evolved. Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else.

Gradle combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build. Powered by a Groovy DSL and packed with innovation, Gradle provides a declarative way to describe all kinds of builds through sensible defaults. Gradle is quickly becoming the build system of choice for many open source projects, leading edge enterprises and legacy automation challenges.  


-?, -h, --help

Shows help message.

-a, --no-rebuild

Do not rebuild project dependencies.

-b, --build-file

Specifies the build file.

-c, --settings-file

Specifies the settings file.


Only relevant projects are configured in this build run. This means faster build for large multi-project builds. [incubating]


Specifies which type of console output to generate. Values are plain, auto (default) or rich.


Continues task execution after a task failure.

-D, --system-prop

Set system property of the JVM (e.g. -Dmyprop=myvalue).

-d, --debug

Log in debug mode (includes normal stacktrace).


Uses the Gradle daemon to run the build. Starts the daemon if not running.


Starts the Gradle daemon in the foreground. [incubating]

-g, --gradle-user-home

Specifies the gradle user home directory.


Launches the Gradle GUI.

-I, --init-script

Specifies an initialization script.

-i, --info

Set log level to info.

-m, --dry-run

Runs the builds with all task actions disabled.


Configure the number of concurrent workers Gradle is allowed to use. [incubating]


Do not use color in the console output. [deprecated - use --console=plain instead]


Do not use the Gradle daemon to run the build.


The build should operate without accessing network resources.

-P, --project-prop

Set project property for the build script (e.g. -Pmyprop=myvalue).

-p, --project-dir

Specifies the start directory for Gradle. Defaults to current directory.


Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use. [incubating]


Build projects in parallel, using the specified number of executor threads. [deprecated - Please use --parallel, optionally in conjunction with --max-workers.] [incubating]


Profiles build execution time and generates a report in the <build_dir>/reports/profile directory.


Specifies the project-specific cache directory. Defaults to .gradle in the root project directory.

-q, --quiet

Log errors only.


Force build script recompiling.


Refresh the state of dependencies.


Ignore previously cached task results.

-S, --full-stacktrace

Print out the full (very verbose) stacktrace for all exceptions.

-s, --stacktrace

Print out the stacktrace for all exceptions.


Stops the Gradle daemon if it is running.

-t, --continuous

Enables continuous build. Gradle does not exit and will re-execute tasks when task file inputs change. [incubating]

-u, --no-search-upward

Don't search in parent folders for a settings.gradle file.

-v, --version

Print version info.

-x, --exclude-task

Specify a task to be excluded from execution.


Official documentation: m[blue][]