**Build Setup tasks** init - Initializes a new Gradle build. [incubating] wrapper - Generates Gradle wrapper files. [incubating] **Help tasks** buildEnvironment - Displays all buildscript dependencies declared in root project 'gradle'. components - Displays the components produced by root project 'gradle'. [incubating] dependencies - Displays all dependencies declared in root project 'gradle'. dependencyInsight - Displays the insight into a specific dependency in root project 'gradle'. dependentComponents - Displays the dependent components of components in root project 'gradle'. [incubating] help - Displays a help message. 这个经常用用就行 model - Displays the configuration model of root project 'gradle'. [incubating] projects - Displays the sub-projects of root project 'gradle'. properties - Displays the properties of root project 'gradle'. tasks - Displays the tasks runnable from root project 'gradle'.
-?, -h, --help Shows this help message. -a, --no-rebuild Do not rebuild project dependencies. -b, --build-file Specifies the build file. 指定要执行的build文件 -c, --settings-file Specifies the settings file. --configure-on-demand Only relevant projects are configured in this build run. This means faster build for large multi-project builds. [incubating] --console Specifies which type of console output to generate. Values are 'plain', 'auto' (default) or 'rich'. --continue 一个task failure后继续执行,但是其它依赖这个failure task的task都不会被执行了 -D, --system-prop Set system property of the JVM (e.g. -Dmyprop=myvalue). -d, --debug Log in debug mode (includes normal stacktrace). --daemon Uses the Gradle Daemon to run the build. Starts the Daemon if not running. --foreground Starts the Gradle Daemon in the foreground. [incubating] -g, --gradle-user-home Specifies the gradle user home directory. --gui Launches the Gradle GUI. -I, --init-script Specifies an initialization script. -i, --info Set log level to info. --include-build Includes the specified build in the composite. [incubating] -m, --dry-run Runs the builds with all task actions disabled. 展示task依赖,执行的先后循序,但不真正build --max-workers Configure the number of concurrent workers Gradle is allowed to use. [incubating] --no-daemon Do not use the Gradle Daemon to run the build. --no-scan Disables the creation of a build scan. [incubating] --offline 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. 指定project的根目录,默认是当前目录 --parallel Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use. [incubating] --profile Profiles build execution time and generates a report in the <build_dir>/reports/profile directory. 在build命令执行时会产生一个report --project-cache-dir Specifies the project-specific cache directory. Defaults to .gradle in the root project directory. -q, --quiet Log errors only. 出错了才显示 --recompile-scripts Force build script recompiling. --refresh-dependencies Refresh the state of dependencies. --rerun-tasks Ignore previously cached task results. 忽视cached上次task结果,强行执行 -S, --full-stacktrace Print out the full (very verbose) stacktrace for all exceptions. -s, --stacktrace Print out the stacktrace for all exceptions. --scan Creates a build scan. Gradle will fail the build if the build scan plugin has not been applied. [incubating] --status Shows status of running and recently stopped Gradle Daemon(s). --stop 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 把某个task排除在外,即使有task依赖它,它也不会被执行