gpt4 book ai didi

gradle - tasks.withType() 的文档在哪里?

转载 作者:行者123 更新时间:2023-12-04 08:21:13 25 4
gpt4 key购买 nike

Gradle 是一个有据可查的项目,但是当我搜索 tasks.withType() 的文档时,我只找到了API docs .

这不是 Gradle 的官方部分吗?

最佳答案

Gradle 中的基本概念之一是一切都针对 Project 执行。实例。一旦你知道了,你就可以通过 javadoc 找到你想要的。也有一些“魔法”需要提防(另一个对话的主题)以及需要理解的 groovy 语法。

所以tasks.withType(...)可以在 javadoc 中查找为 Project.getTasks().withType(...) .

你会注意到 Project.getTasks()返回 TaskCollection (你在谷歌搜索中找到的)

* 编辑 *

有提及here在链接到 TaskContainer 的文档中文档

A project is essentially a collection of Task objects. Each task performs some basic piece of work, such as compiling classes, or running unit tests, or zipping up a WAR file. You add tasks to a project using one of the create() methods on TaskContainer, such as TaskContainer.create(java.lang.String). You can locate existing tasks using one of the lookup methods on TaskContainer, such as TaskCollection.getByName(java.lang.String)

关于gradle - tasks.withType() 的文档在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45880994/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com