# Appendix C. Gradle Command Line

The gradle command has the following usage:

`gradle` [option...] [task-name...]

The command-line options available for the gradle command are listed below:

`-?`, `-h`, `--help`

  Shows a help message.

`-C`, `--cache`

  Specifies how compiled build scripts should be cached. Possible values are: `rebuild` or `on`. Default value is `on`. See Section 12.7, “Caching”.

`-D`, `--system-prop`

  Sets a system property of the JVM, for example `-Dmyprop=myvalue`.

`-I`, `--init-script`

  Specifies an initialization script. See Chapter 40, Initialization Scripts.

`-P`, `--project-prop`

  Sets a project property of the root project, for example `-Pmyprop=myvalue`.

`-S`, `--full-stacktrace`

  Print out the full (very verbose) stacktrace for any exceptions. See Chapter 16, Logging.

`-a`, `--no-rebuild`

  Do not rebuild project dependencies.

`--all`

  Shows additional detail in the task listing. See Section 10.5.1, “Listing tasks”.

`-b`, `--build-file`

  Specifies the build file. See Section 10.4, “Selecting which build to execute”.

`-c`, `--settings-file`

  Specifies the settings file.

`-d`, `--debug`

  Log in debug mode (includes normal stacktrace). See Chapter 16, Logging.

`-e`, `--embedded`

  Specify an embedded build script.

`-g`, `--gradle-user-home`

  Specifies the Gradle user home directory.

`--gui`

  Launches the Gradle GUI. See Chapter 11, Using the Gradle Graphical User Interface.

`-i`, `--info`

  Set log level to info. See Chapter 16, Logging.

`-m`, `--dry-run`

  Runs the build with all task actions disabled.

`-n`, `--dependencies`

  Show list of all project dependencies. See Section 10.5.2, “Listing project dependencies”.

`-p`, `--project-dir`

  Specifies the start directory for Gradle. Defaults to current directory. See Section 10.4, “Selecting which build to execute”.

`-q`, `--quiet`

  Log errors only. See Chapter 16, Logging.

`-r`, `--properties`

  Show list of all available project properties. See Section 10.5.3, “Listing project properties”.

`-s`, `--stacktrace`

  Print out the stacktrace also for user exceptions (e.g. compile error). See Chapter 16, Logging.

`-t`, `--tasks`

  Show list of all available tasks. See Section 10.5.1, “Listing tasks”.

`-u`, `--no-search-upwards`

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

`-v`, `--version`

  Prints version info.

`-x`, `--exclude-task`

  Specifies a task to be excluded from execution. See Section 10.2, “Excluding tasks”.

The same information is printed to the console when you execute `gradle -h`.