Hi. I’m trying to copy some git files that start with a dot (like .gitignore) with a copy task.
But they get simply ignored. I’m trying like this:
task copyTemplateFiles(type: Copy, dependsOn: initGradle) {
from (projectDir) {
include ".gitattributes"
include ".gitignore"
}
from "template"
into destiontionDir
}
And also like this:
task copyTemplateFiles(type: Copy, dependsOn: initGradle) {
from (projectDir) {
include "**/*.gitattributes"
include "**/*.gitignore"
}
from "template"
into destiontionDir
}
Issue tracking moved to GitHub, so many of the original JIRA links don’t work, but you can still search for just about any Gradle issue by ID, such as GRADLE-1883 and get the original result from the archive.
However, at this point, the documentation has the official supported method: Working with Files: Change Default Excludes. I believe the work-around in the issue should trigger a warning now.