Skip to content

Instantly share code, notes, and snippets.

@pcbill
Created December 20, 2016 06:01
Show Gist options
  • Select an option

  • Save pcbill/5bc5122be0bafeeca1bbfe5e16f2b53c to your computer and use it in GitHub Desktop.

Select an option

Save pcbill/5bc5122be0bafeeca1bbfe5e16f2b53c to your computer and use it in GitHub Desktop.
jar, lib, sh 封裝成 zip package
task copyTask << {
println "copy"
copy {
from "src/main/resources"
from "build/libs"
include "**/*.jar"
include "**/*.yml"
include "**/*.sh"
into "build/dist"
}
}
task finalZip(type:Zip) {
from 'build/dist'
baseName = baseName + '_' + version + '-' + new Date().format("yyyyMMdd")
}
finalZip.dependsOn copyTask
build.dependsOn finalZip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment