【发布时间】:2017-12-04 15:12:01
【问题描述】:
src/main/resources/foo/bar/a.xml
hello/world/b.xml
为每个文件添加不同的前缀:
processResources {
eachFile {details ->
if (details.path.starts("foo/"))
details.path = "prefix1/" + details.path
else
details.path = "prefix2/" + details.path
}
}
问题是:jar中包含原始目录。
foo/
foo/bar
hello/
hello/world
似乎 eachFile 迭代了不包括目录的文件。
【问题讨论】:
标签: gradle directory copy rename