What ** means in Gradle Copy task

断了今生、忘了曾经 提交于 2019-12-11 04:36:31

问题


Hi I don't fully understand the hole conception of ** in Gradle copy task. For example

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

What is the difference of include with and without **.


回答1:


The '**' means to include subdirectories

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')

By the way, the usage is EXACTLY the same way the ant tool uses it, since the API is the same.



来源:https://stackoverflow.com/questions/20217397/what-means-in-gradle-copy-task

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!