Why does directly calling groovy closure not work, but using .call() does?

断了今生、忘了曾经 提交于 2019-12-11 08:40:37

问题


This question relates to another question: passing a closure in a plugin extension in gradle

The solution was to call the closure with .call().

Why does this work instead of directly calling the closure?

来源:https://stackoverflow.com/questions/56467564/why-does-directly-calling-groovy-closure-not-work-but-using-call-does

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!