If I have a gradle file like this
apply plugin: 'distribution'
version = '1.2'
distributions {
custom {}
}
By convention, all of the files in the “src/custom/dist” directory will automatically be included in the distribution. https://docs.gradle.org/current/userguide/distribution_plugin.html
What if I want to set the fileMode on some of these files?
If I just specify the fileMode it doesn't do anything.
into("") {
from "src/custom/scripts"
fileMode 0755
}
EDIT: If I put the scripts in another dir and explicitly copy them (rather than them being copied by convention, the code below works.
distributions {
custom {
baseName = 'myApp'
contents {
into("") {
from "src/external/scripts"
fileMode 0755
}
}
}
I am wondering if it is possible to have the files in the conventional place but change the attributes on some of the files.