问题
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