From 9eea5a90853ba377d8652d2c8284ae722c93da45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moon=20Dav=C3=A9?= Date: Fri, 17 Jul 2026 12:36:05 -0400 Subject: [PATCH 1/2] Codesign clobbered when merging webgpu branch --- app/build.gradle.kts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 791cb0f739..0e8132a64a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -539,6 +539,7 @@ tasks.register("signResources") { } group = "compose desktop" val resourcesPath = composeResources("") + val entitlements = file("macos/entitlements.plist").absolutePath // find jars in the resources directory val jars = mutableListOf() @@ -576,11 +577,10 @@ tasks.register("signResources") { exclude("*.jar") exclude("*.so") exclude("*.dll") - }.forEach{ f -> - ProcessBuilder("codesign", "--timestamp", "--force", "--deep", "--options=runtime", "--sign", "Developer ID Application", f.absolutePath) - .inheritIO() - .start() - .waitFor() + }.forEach{ file -> + exec { + commandLine("codesign", "--timestamp", "--force", "--deep","--options=runtime", "--entitlements", entitlements, "--sign", "Developer ID Application", file) + } } jars.forEach { file -> FileOutputStream(File(file.parentFile, file.nameWithoutExtension)).use { fos -> @@ -631,6 +631,7 @@ tasks.register("signApp"){ "--force", "--deep", "--options=runtime", + "--entitlements", file("macos/entitlements.plist").absolutePath, "--sign", "Developer ID Application", app) } From 265f47f89f63436efadc4531dbb6117994373620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moon=20Dav=C3=A9?= Date: Fri, 17 Jul 2026 13:04:22 -0400 Subject: [PATCH 2/2] patch for gradle9 --- app/build.gradle.kts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0e8132a64a..6acfc49bb9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,9 +5,11 @@ import org.jetbrains.compose.ExperimentalComposeLibrary import org.jetbrains.compose.desktop.application.dsl.TargetFormat import org.jetbrains.compose.desktop.application.tasks.AbstractJPackageTask import org.jetbrains.compose.internal.de.undercouch.gradle.tasks.download.Download +import org.gradle.process.ExecOperations import java.io.FileOutputStream import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream +import javax.inject.Inject // TODO: Update to 2.10.20 and add hot-reloading: https://github.com/JetBrains/compose-hot-reload @@ -531,6 +533,11 @@ tasks.register("includeProcessingResources"){ finalizedBy("signResources") } +// Project.exec was removed in Gradle 9; an injected ExecOperations is the replacement +interface ExecOps { + @get:Inject val execOps: ExecOperations +} + tasks.register("signResources") { onlyIf { OperatingSystem.current().isMacOsX @@ -541,6 +548,8 @@ tasks.register("signResources") { val resourcesPath = composeResources("") val entitlements = file("macos/entitlements.plist").absolutePath + val execOps = objects.newInstance().execOps + // find jars in the resources directory val jars = mutableListOf() doFirst{ @@ -578,7 +587,7 @@ tasks.register("signResources") { exclude("*.so") exclude("*.dll") }.forEach{ file -> - exec { + execOps.exec { commandLine("codesign", "--timestamp", "--force", "--deep","--options=runtime", "--entitlements", entitlements, "--sign", "Developer ID Application", file) } }