From 4673b6b1f8f2ed3bb995879d2be0b0d486406267 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 5 Mar 2026 22:18:43 +0100 Subject: [PATCH] Use lazy evaluation for dependencies of the zipDistributable task The createDistributable task is generated by the Compose plugin, so it's not always available when zipDistributable task is configured. Using lazy evaluation by wrapping these expressions in a Provider avoids that issue. This issue was encountered in the Nix build, presumably because it uses single-threaded compilation. --- app/build.gradle.kts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4f91e6d98..8cada70cd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -359,12 +359,12 @@ tasks.register("zipDistributable"){ dependsOn("createDistributable", "setExecutablePermissions") group = "compose desktop" - val dir = distributable().destinationDir.get() - val packageName = distributable().packageName.get() + val dir = provider { distributable().destinationDir.get() } + val packageName = provider { distributable().packageName.get() } from(dir){ eachFile{ permissions{ unix("755") } } } archiveBaseName.set(packageName) - destinationDirectory.set(dir.file("../").asFile) + destinationDirectory.set(layout.dir(provider { dir.get().file("../").asFile })) } afterEvaluate{