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?
This issue is mentioned in GRADLE-1883 and also contains a possible solution that would allow you not to rename.
If you want to use this code, you should be able to remove the second line in the doFirst. This commit removed the need to add back a default exclude, mentioning the same use case as shown in GRADLE-1883.