Appendix D. Gradle Command Line
http://www.gradle.org/docs/current/userguide/gradle_command_line.html

Appendix D. Gradle Command Line
The gradle command has the following usage:
gradle [option...] [task...]
The command-line options available for the gradle command are listed below:
-?,-h,--help-
Shows a help message.
-a,--no-rebuild-
Do not rebuild project dependencies.
--all-
Shows additional detail in the task listing. See Section 11.6.2, “Listing tasks”.
-b,--build-file-
Specifies the build file. See Section 11.5, “Selecting which build to execute”.
-c,--settings-file-
Specifies the settings file.
--continue-
Continues task execution after a task failure.
--configure-on-demand (incubating)-
Only relevant projects are configured in this build run. This means faster builds for large multi-projects. See Section 57.1.1.1, “Configuration on demand”.
-D,--system-prop-
Sets a system property of the JVM, for example
-Dmyprop=myvalue. See Section 14.2, “Gradle properties and system properties”. -d,--debug-
Log in debug mode (includes normal stacktrace). See Chapter 18, Logging.
-g,--gradle-user-home-
Specifies the Gradle user home directory. The default is the
.gradledirectory in the user's home directory. --gui-
Launches the Gradle GUI. See Chapter 12, Using the Gradle Graphical User Interface.
-I,--init-script-
Specifies an initialization script. See Chapter 61, Initialization Scripts.
-i,--info-
Set log level to info. See Chapter 18, Logging.
-m,--dry-run-
Runs the build with all task actions disabled. See Section 11.7, “Dry Run”.
--no-color-
Do not use color in the console output.
--offline-
Specifies that the build should operate without accessing network resources. See Section 51.9.2, “Command line options to override caching”.
-P,--project-prop-
Sets a project property of the root project, for example
-Pmyprop=myvalue. See Section 14.2, “Gradle properties and system properties”. -p,--project-dir-
Specifies the start directory for Gradle. Defaults to current directory. See Section 11.5, “Selecting which build to execute”.
--parallel (incubating)-
Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use. This option should only be used with decoupled projects (see Section 57.9, “Decoupled Projects”).
--parallel-threads (incubating)-
Build projects in parallel, using the specified number of executor threads. For example
--parallel-threads=3. This option should only be used with decoupled projects (see Section 57.9, “Decoupled Projects”). --profile-
Profiles build execution time and generates a report in the
directory. See Section 11.6.7, “Profiling a build”.buildDir/reports/profile --project-cache-dir-
Specifies the project-specific cache directory. Default value is
.gradlein the root project directory. See Section 14.6, “Caching”. -q,--quiet-
Log errors only. See Chapter 18, Logging.
--recompile-scripts-
Specifies that cached build scripts are skipped and forced to be recompiled. See Section 14.6, “Caching”.
--refresh-dependencies-
Refresh the state of dependencies. See Section 51.9.2, “Command line options to override caching”.
--rerun-tasks-
Specifies that any task optimization is ignored.
-S,--full-stacktrace-
Print out the full (very verbose) stacktrace for any exceptions. See Chapter 18, Logging.
-s,--stacktrace-
Print out the stacktrace also for user exceptions (e.g. compile error). See Chapter 18, Logging.
-u,--no-search-upwards-
Don't search in parent directories for a
settings.gradlefile. -v,--version-
Prints version info.
-x,--exclude-task-
Specifies a task to be excluded from execution. See Section 11.2, “Excluding tasks”.
The above information is printed to the console when you execute gradle -h.
D.1. Daemon command-line options:
The Chapter 19, The Gradle Daemon contains more information about the daemon. For example it includes information how to turn on the daemon by default so that you can avoid using --daemon all the time.
--daemon-
Uses the Gradle daemon to run the build. Starts the daemon if not running or existing daemon busy. Chapter 19, The Gradle Daemon contains more detailed information when new daemon processes are started.
--foreground-
Starts the Gradle daemon in the foreground. Useful for debugging or troubleshooting because you can easily monitor the build execution.
--no-daemon-
Do not use the Gradle daemon to run the build. Useful occasionally if you have configured Gradle to always run with the daemon by default.
--stop-
Stops the Gradle daemon if it is running. You can only stop daemons that were started with the Gradle version you use when running
--stop.
D.2. System properties
The following system properties are available for the gradle command. Note that command-line options take precedence over system properties.
gradle.user.home
Specifies the Gradle user home directory.
The Section 20.1, “Configuring the build environment via gradle.properties” contains specific information about Gradle configuration available via system properties.
D.3. Environment variables
The following environment variables are available for the gradle command. Note that command-line options and system properties take precedence over environment variables.
GRADLE_OPTS-
Specifies command-line arguments to use to start the JVM. This can be useful for setting the system properties to use for running Gradle. For example you could set
GRADLE_OPTS="-Dorg.gradle.daemon=true"to use the Gradle daemon without needing to use the--daemonoption every time you run Gradle. Section 20.1, “Configuring the build environment via gradle.properties” contains more information about ways of configuring the daemon without using environmental variables, e.g. in more maintainable and explicit way. GRADLE_USER_HOME-
Specifies the Gradle user home directory (which defaults to “
USER_HOME/.gradle” if not set). JAVA_HOME-
Specifies the JDK installation directory to use.
Appendix D. Gradle Command Line的更多相关文章
- Linux Command Line learning
https://www.codecademy.com/en/courses/learn-the-command-line Background The command line is a text i ...
- How to build .apk file from command line(转)
How to build .apk file from command line Created on Wednesday, 29 June 2011 14:32 If you don’t want ...
- Can't use Subversion command line client: svn Probably the path to Subversion executable is wrong. Fix it.
1.最近使用SVN工具时,Checkout出项目到本地后后,然后将其导入到Intellij idea中开发,在提交svn代码的时候,出现这样的错误:Can't use Subversion comma ...
- How to Use Android ADB Command Line Tool
Android Debug Bridge (adb) is a tool that lets you manage the state of an emulator instance or Andro ...
- Chrome-Console( Command Line API Reference)
来源于:https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference The Comma ...
- logoff remote desktop sessions via command line tools
This trick I learned from my one of ex-college. In Windows servers, only two remote desktop session ...
- 使用intellij的svn时提示出错: Can't use Subversion command line client: svn.Errors found while svn working copies detection.
使用Intellij的svn时提示出错:Can't use Subversion command line client: svn. Errors found while svn working co ...
- ubuntu16.04安装virtualbox5.1失败 gcc:error:unrecognized command line option ‘-fstack-protector-strong’
系统:ubuntu16.04.1 软件:Virtualbox-5.1 编译器:GCC 4.7.4 在如上环境下安装Vbx5.1提示我在终端执行/sbin/vboxconfig命令 照做 出现如下err ...
- Linux Command Line 笔记(1)
Yunduan CUI graphical user interfaces make easy tasks easy, while command line interfaces make diffi ...
- Can't use Subversion command line client:svn
在Intellij IDEA里checkout东西时出先这个错误提示:Can't use Subversion command line client:svn Subversion command l ...
随机推荐
- 【WALT】WALT入口 update_task_ravg() 代码详解
目录 [WALT]WALT入口 update_task_ravg() 代码详解 代码展示 代码逻辑 ⑴ 判断是否进入 WALT 算法 ⑵ 获取 WALT 算法中上一个窗口的开始时间 ⑶ 如果任务刚初始 ...
- fidder中勾选check for certificate revocations导致手机无法连上fidder服务器
在测试过程中因为要获取一个小程序登录API,就用手机设置代理后抓取,在抓取过程中发现提示用户名密码错误(未使用代理正常登录) 遂逐步查找,在与别人核对tools-option发现自己https页签中勾 ...
- 软件设计 day1
Software Design Methodology 软件设计方法学 中国石油大学(华东)2022-2023-3 国际周课程 Advanced software design 张晓东老师邀请在日本广 ...
- 微信小程序 - WXML 模板语法
[黑马程序员前端微信小程序开发教程,微信小程序从基础到发布全流程_企业级商城实战(含uni-app项目多端部署)] https://www.bilibili.com/video/BV1834y1676 ...
- Java中AQS的原理与实现
目录 1:什么是AQS? 2:AQS都有那些用途? 3:我们如何使用AQS 4:AQS的实现原理 5:对AQS的设计与实现的一些思考 1:什么是AQS 随着计算机的算力越来越强大,各种各样的并行编 ...
- Python安装time库失败?不是吧阿sir你还不知道内置模块不用下载吧
嗨嗨,今天给python安装time库,一直报错,换源等办法都试过了 直到我看到 Python中有以下常用模块不用单独安装 random模块 sys模块 time模块 os系统操作 re正则操作 js ...
- spring cloud微服务搭建配置中心之携程开源框架Apollo
1.Apollo(阿波罗) Apollo(阿波罗)是携程框架部门研发的分布式配置中心,能够集中化管理应用不同环境.不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限.流程治理等特性,适 ...
- [linux]frp内网穿透
前言 假设有如下网络拓扑 A可以访问B,但B无法访问A.A和B都能访问C.如果B需要访问A的8000端口,一般有如下方法: 网络管理员做路由转发.硬件层面网络转发,性能一般来说更好,但需要熟悉路由配置 ...
- 基于redis6搭建集群
前言 系统版本:CentOS 7 redis版本:redis6.2.4,官方tar.gz包 两台服务器: 172.50.11.11 端口7002.7004.7006 172.50.12.11 端口70 ...
- html5 3.0 表单
表单的定义:多个输入框,以表格的形式展示 表单常用在网页登录和注册功能中 表单的元素属性:<input type="text"name=" "valu ...