Skip to content

Commit 1f62948

Browse files
committed
Update build.gradle.kts
1 parent ca4271d commit 1f62948

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

app/build.gradle.kts

+20
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,24 @@ afterEvaluate {
234234
"renameWindres"
235235
)
236236
}
237+
tasks.register("setExecutablePermissions") {
238+
description = "Sets executable permissions on binaries in Processing.app resources"
239+
group = "compose desktop"
240+
241+
doLast {
242+
val resourcesPath = layout.buildDirectory.dir("compose/binaries")
243+
fileTree(resourcesPath) {
244+
include("**/resources/**/bin/**")
245+
include("**/resources/**/*.sh")
246+
include("**/resources/**/*.dylib")
247+
include("**/resources/**/*.so")
248+
include("**/resources/**/*.exe")
249+
}.forEach { file ->
250+
if (file.isFile) {
251+
file.setExecutable(true, false)
252+
}
253+
}
254+
}
255+
}
256+
tasks.findByName("createDistributable")?.finalizedBy("setExecutablePermissions")
237257
}

0 commit comments

Comments
 (0)