【发布时间】:2017-12-13 07:28:27
【问题描述】:
在"foo/bar"目录下创建一个zip添加文件"hello/world.xml"为"hello/universe.xml"
task myZip(type: Zip) {
from ("foo/bar") {
include "hello/world.xml"
filesMatching("hello/*") {
it.path = "hello/universe.xml"
}
}
}
filesMatching(...) 会明显影响性能。
有什么更好的方法?喜欢:
task myZip(type: Zip) {
from ("foo/bar") {
include ("hello/world.xml") {
rename "hello/universe.xml"
}
}
}
但rename 不支持include。
【问题讨论】: