Since moving to Gradle 9, my bash scripts in `src/...
# community-support
a
Since moving to Gradle 9, my bash scripts in
src/main/dist/bin
lose their exec attribute when being copied into the archive by the distribution plugin. That's a bug isn't it?
a
Doh - thanks. Seems weird to change the default.
v
Permissions configured on the copy-spec are hopefully still taken into account @Anze Sodja?
It's imho anyway better to configure it there for consistent cross-OS build results
👍 1
a
You mean:
Copy code
eachFile {
 ...
}
? yes it overrides setting on a task. We actually didn't change any behaviour, just the default.
👌 1
> Seems weird to change the default. There was a lot of comments in https://github.com/gradle/gradle/issues/30871 But this execution flag is probably the most surprising thing indeed. But more we discussed it, it seemed that the right way is to have fully reproducible archives in the end and offer opt-out for permissions. That is why we also added an opt-out flag on the build level via:
Copy code
org.gradle.archives.use-file-system-permissions=true
👍 2
a
Makes sense. And it's easy for me to fix. I suppose it would be nice to have a warning from Gradle saying it has changed a file's permission to 0644 (if that file wasn't 0644) and that I need to setup handling to deal with that if I want to keep the original permissions. I take @Vampire's point that it's better to explicitly configure it for consistency.