From 0f12a04b7c7442c76d22c38af9ac87d22f299691 Mon Sep 17 00:00:00 2001 From: Ben Liblit Date: Sat, 9 Sep 2023 21:46:54 -0400 Subject: [PATCH] Set executable during task configuration This task's `executable` is an input to the task. We should set it during task configuration time for more precise caching. --- cast/smoke_main/build.gradle.kts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cast/smoke_main/build.gradle.kts b/cast/smoke_main/build.gradle.kts index 31eb2bc2a7..7eea263c95 100644 --- a/cast/smoke_main/build.gradle.kts +++ b/cast/smoke_main/build.gradle.kts @@ -86,7 +86,12 @@ application { // main executable to run for test inputs.file(linkedFile) - doFirst { executable(linkedFile.get().asFile) } + executable( + object { + val toString by lazy { linkedFile.get().asFile.toString() } + + override fun toString() = toString + }) // xlator Java bytecode + implementation of native methods val pathElements = project.objects.listProperty()