什么是编译组,名称等......?(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.
更多推荐
发布评论