Gradle Jar任务清单配置

时间:2015-08-10 07:55:10

标签: groovy gradle

我正在查看以下Gradle片段:

apply plugin: java

task customJar(type: Jar) {
    manifest {
        attributes firstKey: 'firstValue', secondKey: 'secondValue'
    }
}

如果我理解正确的话:

  1. manifest代码段会在manifest(Closure<?>)任务中调用Jar方法,
  2. Manifest对象传递给闭包
  3. attributes代码段会调用attributes(Map)上的Manifest方法吗?
  4. firstKey: 'firstValue', secondKey: 'secondValue'会创建Map吗?看起来地图文字需要成为[]的一部分。

0 个答案:

没有答案