在 gradle 的 Android 插件中,我想使用这个建议使用 all
迭代器的方法:
/**
* Returns the list of Application variants. Since the collections is built after evaluation,
* it should be used with Groovy's <code>all</code> iterator to process future items.
*
*/
public DefaultDomainObjectSet<ApplicationVariant> getApplicationVariants() {
return applicationVariantList
}
但是,我没有设法在 Groovy 官方文档中找到有关此迭代器的任何信息。
在哪里可以找到有关此迭代器的更多信息?它与 each
迭代器有何不同?
最佳答案
终于找到了all
的来源。这是来自 Gradle api 的方法:https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultDomainObjectCollection.java
关于android - 什么是 "all"迭代器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30637819/