I need to copy a file from one location to another location using gradle and stop further processing if the file is not in the destination. But I don't have the exact file name. I have to use the format of the file to check like *.war or *.jar. But assert is not working on path/*.war but if I give "path/name.war" then it is working. Any idea how to do assert for "path/*.war"
from fileTree( "target" ), {
include "*.war"
into '/usr/share/bin/web/'
}
<code>
assert file("/usr/share/bin/web/\*.war").exists(); --> not working
assert file("/usr/share/bin/web/\name.war").exists(); --> working
Is it this what you are looking for?