Gradle - 如何使用“-"运行蚂蚁任务名义上 [英] Gradle - how to run ant task with "-" in name

查看:26
本文介绍了Gradle - 如何使用“-"运行蚂蚁任务名义上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 gradle 构建中使用 cobertura,所以我以这种方式创建了任务:

I want to use cobertura in my gradle build so I created task in this way:

ant.typedef(resource: 'tasks.properties', classpath:configurations.cobertura.asPath)

现在我想运行 cobertura-instrument.问题是我不知道如何运行这个任务,因为 ant.cobertura-instrument(...) 不起作用.有没有其他方法可以运行它?例如像这样的 ant.tasks['cobertura-instrument'](...)

And now I want to run cobertura-instrument. The problem is that I don't know how to run this task because ant.cobertura-instrument(...) won't work. Is there some other way to run it? For example something like this ant.tasks['cobertura-instrument'](...)

推荐答案

您也可以像这样使用 ant."cobertura-instrument"(...) 的任务.

You can also use the task like this ant."cobertura-instrument"(...).

这篇关于Gradle - 如何使用“-"运行蚂蚁任务名义上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆