mpettigr
(Mark)
October 1, 2015, 7:51pm
#1
I’m trying to match a filename in my local directory that ends with a tilde. The FileTree class does not appear to handle this case.
FileTree tree = fileTree(’.’) {
include ‘*~’
}
tree.each { File file -> println file }
Any ideas on how to match a filename with a tilde in it? Thanks!
sterling
(Sterling Greene)
October 1, 2015, 8:07pm
#2
It’s the same problem described here:
I need to copy some github project to another location. The other-folder ends up without the .git and .gitignore files.
task('myCopyTask', type: Copy) {
into("other-folder")
from ("github-source-code")
}
I fixed the problem with .git folder adding a specific task for it.
I am fixing the problem .gitignore files renaming them before and after the copy, but isn’t there an easy way to do it?
and here:
https://issues.gradle.org/browse/GRADLE-1883
For backwards compatibility, we’re stuck with using the default Ant excludes in all PatternSets. One of the exclusions is ‘**/*~’. The JIRA ticket describes a workaround, basically, you have to remove the global exclusion.