From 1f629483b8e3ad195372a798343e052887e4e9a8 Mon Sep 17 00:00:00 2001 From: Stef Tervelde Date: Fri, 28 Feb 2025 16:19:36 +0100 Subject: [PATCH] Update build.gradle.kts --- app/build.gradle.kts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ccdd34fb6..d9bb94168 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -234,4 +234,24 @@ afterEvaluate { "renameWindres" ) } + tasks.register("setExecutablePermissions") { + description = "Sets executable permissions on binaries in Processing.app resources" + group = "compose desktop" + + doLast { + val resourcesPath = layout.buildDirectory.dir("compose/binaries") + fileTree(resourcesPath) { + include("**/resources/**/bin/**") + include("**/resources/**/*.sh") + include("**/resources/**/*.dylib") + include("**/resources/**/*.so") + include("**/resources/**/*.exe") + }.forEach { file -> + if (file.isFile) { + file.setExecutable(true, false) + } + } + } + } + tasks.findByName("createDistributable")?.finalizedBy("setExecutablePermissions") } \ No newline at end of file