1
Что означает it.name
? Сгенерирован ли он или могут быть указаны значения? Is it
как this
, относится к текущий объект?Gradle Значение DSL для этого.
jar.doFirst
{
// aggregate all the jars needed at runtime into a local variable (array)
def manifestClasspath = configurations.runtime.collect { it.name }
// remove duplicate jar names, and join the array into a single string
manifestClasspath = manifestClasspath.unique().join(" ")
// set manifest attributes - mainClassName must be set before it is used here
manifest.attributes.put("Main-Class", mainClassName)
manifest.attributes.put("Class-Path", manifestClasspath)
}
Этот метод будет выполняться до jar
задачи?
см:
https://stackoverflow.com/a/22736602/262852
'it' является неявной переменной (и сокращением) для итератора. Обратите внимание, что 'it' от groovy и не добавляется Gradle DSL. – RaGe