From 39806d764d7b5f94d6a74909beb8dd8a2716f47e Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Thu, 2 Jul 2026 12:31:00 -0600 Subject: [PATCH] [Gradle] `chmod +x` scripts meant for execution Gradle strips the executable bit from the shell files when it puts them into the zip file. This adds the bit back. --- build.gradle.kts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 7684a73f..009665b5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -135,6 +135,14 @@ val distZip by tasks.registering(Zip::class) { exclude("share_ad_job_state/tests/**") } + // Gradle's Zip task does not preserve source file permissions, so the + // executable bit on shell scripts must be set explicitly. + filesMatching("*.sh") { + permissions { + unix("0755") + } + } + // Root docs from(".") { include("LICENSE.txt", "NOTICE.txt", "README.md")