Gradle it.name 的 DSL 含义
Gradle DSL meaning for it.name
it.name
是什么意思?它是生成的,还是可以指定值? it
是否像this
,指的是当前对象?
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
任务之前执行?
参见:
it.name
是什么意思?它是生成的,还是可以指定值? it
是否像this
,指的是当前对象?
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
任务之前执行?
参见: