Skip to content

Commit 174753c

Browse files
authored
Use lazy evaluation for dependencies of the zipDistributable task (#1474)
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. Co-authored-by: Tony Wasserka <neobrain@users.noreply.github.com>
1 parent 32f593b commit 174753c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,12 @@ tasks.register<Zip>("zipDistributable"){
359359
dependsOn("createDistributable", "setExecutablePermissions")
360360
group = "compose desktop"
361361

362-
val dir = distributable().destinationDir.get()
363-
val packageName = distributable().packageName.get()
362+
val dir = provider { distributable().destinationDir.get() }
363+
val packageName = provider { distributable().packageName.get() }
364364

365365
from(dir){ eachFile{ permissions{ unix("755") } } }
366366
archiveBaseName.set(packageName)
367-
destinationDirectory.set(dir.file("../").asFile)
367+
destinationDirectory.set(layout.dir(provider { dir.get().file("../").asFile }))
368368
}
369369

370370
afterEvaluate{

0 commit comments

Comments
 (0)