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 ...
随机推荐
- Unknown entity XXX
在jdbc中使用session保存实体的时候,保存出错,Unknown entity XXX 一种解决方案为 http://ningnian169.blog.51cto.com/2417825/450 ...
- mysql 的用法
SELECT CASEWHEN //当count(userId) = 0的时候 让其为null 不然报警告 // count(DISTINCT userId) 不用处理 count(userId ...
- 软件项目技术点(7)——在canvas上绘制自定义图形
AxeSlide软件项目梳理 canvas绘图系列知识点整理 图形种类 目前我们软件可以绘制出来的形状有如下这几种,作为开发者我们一直想支持用户可以拖拽的类似word里面图形库,但目前还没有找到比 ...
- sql-syscolumns,INFORMATION_SCHEMA.columns,sysobjects
//计算表tb_Blog的字段个数 select count(*) from syscolumns where id=object_id('tb_Blog') 获取指定表的所有字段和字段类型 SELE ...
- html+css中常见的浏览器兼容性处理
1.居中问题 div里的内容,IE默认为居中,而FF默认为左对齐,可以尝试增加代码margin: 0 auto; 2.高度问题 两上下排列或嵌套的div,上面的div设置高度(height),如果di ...
- ArcEngnine中IHookHelper的用法
一.IHookHelper 主要在用在自定义类型于AE带的的ICommand或ITool等 1.实例化IHookHelper 对象:IHookHelper m_hookHelper = new Hoo ...
- Codeforces Round #411 A. Fake NP
A. Fake NP time limit per test 1 second memory limit per test 256 megabytes Tavak and Seyyed a ...
- 【windows c】 遍历目录
方式一: DWORD z_dRed = 0; char z_FilePath[MAX_PATH] = {0}; char z_newPath[MAX_PATH] = {0}; char z_tmpPa ...
- metasploit 连接database相关问题
我们首先去这个目录下看database.yml文件内容: 下图是我们看到的的信息 接着打开metasploit,运行db_connect 指令链接数据库.格式为: db_connect 用户名:密码@ ...
- Windows下sc create命令行添加/创建/修改服务
添加服务: sc create TestService binpath= "D:\TestApp\TestService.exe" 注意:所有的等号和值之间需要一个空格(等号前不要 ...