【发布时间】:2016-11-03 03:56:30
【问题描述】:
我正在使用 gradle 进行构建。当我执行“gradle clean build”时,它会执行我所有的测试用例并构建成功。当我执行 gradle clean cobertura 时,它会生成我的 cobertura 报告。我想将 cobertura 报告集成为 gradle build 的一部分。我在 build.gradle 中尝试了以下选项,但它给了我一个错误。
build{
dependsOn cobertura
}
我得到的错误。对此有什么想法吗?
Could not determine the dependencies of task ':build'.
> Cannot convert net.saliman.gradle.plugin.cobertura.CoberturaExtension_Decorated@528e5e38 to a task.
The following types/formats are supported:
- A String or CharSequence task name or path
- A Task instance
- A Buildable instance
- A TaskDependency instance
- A Closure instance that returns any of the above types
- A Callable instance that returns any of the above types
- An Iterable, Collection, Map or array instance that contains any of the above types
【问题讨论】: