file - **在Gradle Copy任务中意味着什么

标签 file copy gradle

您好,我对Gradle复制任务中的**孔概念不完全了解。例如

task copyPoems(type: Copy) {
 from 'text-files'
 into 'build/poems'
 include '**/sh*.txt'
}

包含和不包含**的区别是什么。

最佳答案

“**”表示包括子目录

include '**/sh*.txt'  // include all sh*.txt files in 'text-files' and any subdirectory

include 'sh*.txt'  // include all sh*.txt files in only the one directory (eg, 'text-files')

顺便说一下,由于API是相同的,用法与ant工具使用的用法完全相同。

关于file - **在Gradle Copy任务中意味着什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20217397/

相关文章:

file - 不能用Nginx(反向代理+SSL协商)和Tomcat上传大文件

android - 在 android 中拆分后文件不在本地播放

c# - 覆盖文件最快的方法是什么?

gradle - 嵌套的gradle构建

c 程序将媒体文件从一个位置复制到另一个位置

Python读取.txt文件->列表

string - 使用 VBA 将可变文本字符串(时间戳)插入单元格

linux - 如何复制文件/目录而不更改其属性

java - 无法在多模块 Gradle 应用程序中 Autowiring HttpServletRequest

java - Gradle找不到本地依赖项目