Gradle Goodness: Check Task Dependencies With a Dry Run
We can run a Gradle build without any of the task actions being executed. This is a so-called dry run of our build. We can use the dry run of a build to see if the task dependencies we have defined or are defined in a plugin are defined properly. Because all tasks and task dependencies are resolved if we use the dry run mode we can see in the output which tasks are executed.
We define a simple build file with three tasks and some task dependencies:
0.def printTaskNameAction = {1.println "Running ${it.name}"2.}3. 4.task first << printTaskNameAction5. 6.task second(dependsOn: first) << printTaskNameAction7. 8.task third(dependsOn: [first, second]) << printTaskNameActionTo run a Gradle build as a dry run we can use the command line option -m or --dry-run. So let's execute the task third with the dry run command line option:
$ gradle -m third:first SKIPPED:second SKIPPED:third SKIPPEDBUILD SUCCESSFULTotal time: 2.242 secs$ And we see in the output none of the tasks are really executed, because SKIPPED is shown, but we do see the task names of the tasks that are resolved.
Written with Gradle 2.2.
Gradle Goodness: Check Task Dependencies With a Dry Run的更多相关文章
- Gradle Goodness: Skip Building Project Dependencies
If we use Gradle in a multi-module project we can define project dependencies between modules. Gradl ...
- Gradle Goodness: Working with Live Task Collection
Gradle support the definition of so called live collections. These collections are mostly created ba ...
- Gradle Goodness: Task Output Annotations Create Directory Automatically
Gradle Goodness: Task Output Annotations Create Directory Automatically One of the great features of ...
- Gradle Goodness: Excluding Tasks for Execution
In Gradle we can create dependencies between tasks. But we can also exclude certain tasks from those ...
- Gradle Goodness: Copy Files with Filtering
Gradle Goodness: Copy Files with Filtering Gradle's copy task is very powerful and includes filterin ...
- Gradle Goodness: Init Script for Adding Extra Plugins to Existing Projects
Gradle Goodness: Init Script for Adding Extra Plugins to Existing Projects Gradle is very flexible. ...
- Gradle Goodness: Using and Working with Gradle Version
To get the current Gradle version we can use the gradleVersion property of the Gradle object. This r ...
- Gradle Goodness: Automatic Clean Tasks
Gradle adds the task rule clean<Taskname> to our projects when we apply the base plugin. This ...
- Gradle Goodness: Changing Name of Default Build File
Gradle uses the name build.gradle as the default name for a build file. If we write our build code i ...
随机推荐
- Incorrect column count: expected 1, actual 5
在使用jdbc的querForObject queryForList的时候,出现Incorrect column count: expected 1, actual 5 比如 String sql = ...
- js-原始类型和声明变量
** Java的基本数据类型:byte.short.int.long.float.double.char.boolean ** 定义变量 都是用关键字 var(ES6中可以使用const和let来定义 ...
- EMSAscript
1.javaScript 中const.var.let区别 const 定义的变量不可修改 而且必须初始化 =>解决闭包变量污染问题 var 定义的变量可以修改 如果不初始化则默认值为undef ...
- 在URL里传入数组到HTML 里。
需求 静态页面根据URL输入,动态显示图表满足如下两个条件. 1. 隐藏指定的行 2. 设定初始显示的Check box 需要的部分被打勾 实现 1. 创建一个静态的页面, <table id= ...
- Tesseract-OCR-05-主要API功能介绍
Tesseract-05-主要API功能介绍 tesseract本身代码是由c/c++混编而成的,其中有用的简单的接口函数几乎都是在baseapi.h中 从其处理过程中,不难得出: 它还需要有一个im ...
- Python爬虫教程-13-爬虫使用cookie爬取登录后的页面(人人网)(下)
Python爬虫教程-13-爬虫使用cookie爬取登录后的页面(下) 自动使用cookie的方法,告别手动拷贝cookie http模块包含一些关于cookie的模块,通过他们我们可以自动的使用co ...
- Openstack实践(1)部署使用实例及neutron网络
版权声明:本文为博主原创文章,欢迎转载,转载请注明作者.原文超链接 ,博主地址:http://www.cnblogs.com/SuperXJ/ 如何快速部署使用openstack,使用kolla吧,o ...
- django模板报错:Requested setting TEMPLATE_DEBUG, but settings are not configured. You must either define
转自:http://blog.csdn.net/xiaowanggedege/article/details/8651236 django模板报错: Requested setting TEMPLAT ...
- Echarts实现隐藏x轴,y轴,刻度线,网格
"yAxis": [ { //就是一月份这个显示为一个线段,而不是数轴那种一个点点 "show" : true, "boundaryGap" ...
- .NET预处理器指令
.NET预处理器指令 做开发以来很少接触到这部分内容,基本上没有用到,偶尔在一些框架中和一些开源项目中会见到,常常因为只关心实现逻辑忽略了这部分的功能.现在自己有点时间了,还是希望能够完整的对这部分做 ...