什么是编译组,名称等......?(What is the compile group, name etc…?)

编程入门 行业动态 更新时间:2024-10-18 05:57:21
什么是编译组,名称等......?(What is the compile group, name etc…?)

我遇到了以下方法调用:

dependencies { compile group: 'commons-collections', name : 'commons-collections', version: '3.2' }

好吧,在Project中定义的dependencies(Closure closure)和上面的代码只是它的调用。

但是从Groovy的角度看封闭的主体是什么?

compile group: 'commons-collections', name : 'commons-collections', version: '3.2'

I come across the following method invocation:

dependencies { compile group: 'commons-collections', name : 'commons-collections', version: '3.2' }

Well, dependencies(Closure closure)'s defined in Project and the code above is just its invocation.

But what is the closure's body in the Groovy point of view?

compile group: 'commons-collections', name : 'commons-collections', version: '3.2'

最满意答案

从groovy的角度来看这句话:

compile group: 'commons-collections', name : 'commons-collections', version: '3.2'

只是一个普通的Map 。 它与以下内容完全相同:

apply plugin: 'java' - 有关详细信息,请参阅此处 。

From groovy point of view this statement:

compile group: 'commons-collections', name : 'commons-collections', version: '3.2'

is just a normal Map. It works exactly the same as in:

apply plugin: 'java' - see here for details.

更多推荐

本文发布于:2023-08-07 11:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464482.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:名称   compile   group

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!