Gradle tooling api获取任务输出 [英] Gradle tooling api get task outputs

查看:479
本文介绍了Gradle tooling api获取任务输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Gradle工具API GradleProject.getTasks(),我设法得到了一些项目的任务列表。这是一个很酷的,我可以阅读任务的名称,描述,组和它是否是公开的。



我想知道是否有可能获得任务输出目录,尤其是对于测试或代码覆盖的东西,这类产生类似HTML的报告的任务。在网络用户界面中显示这些报告会很好。



有谁知道这是否可行,或者至少计划在未来版本的工具中添加API?



非常感谢:

解决方案

目前Gradle工具API不支持类似HTML的报告。例如,对于Android测试任务(用于UI自动化测试的unit和cAT任务),您应该使用您在构建中使用的任务来实现报告。

可以在[您的项目路径] / app / build / reports中找到HTML测试结果。


I've managed to get some project's task list thanks to the Gradle tooling API GradleProject.getTasks(). It's kinda cool, I can read task's name, description, group and whether it's public or not.

I was wondering if it was possible to get tasks outputs directory, especially for tests or code coverage stuff, the kind of tasks that produce HTML-like reports. It would be nice to display these reports in a web UI.

Does anyone know if this is possible, or at least planned to be added in a future release of the tooling API ?

Thanks alot :)

解决方案

If my understanding is correct, currently Gradle tooling API doesn't support HTML-like reports. There reports should be implemented by the tasks you are using in your build.

For example, for Android testing tasks(task for unit and cAT for UI automation testing), you can find the HTML testing result in [your project path]/app/build/reports.

这篇关于Gradle tooling api获取任务输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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