This message was deleted.
# configuration-cache
s
This message was deleted.
j
m
I'm curious how do you use the output afterwards? Something like
Copy code
doLast {
  println(standardOutput.toString())
}
? Or a
TaskProvider.map { }
? I see that the
Exec
javadoc suggests using
ext
, but that wouldn't work with CC either.
j
standardOutput.toString().trim()
looks using this fixes the issue
Copy code
doLast {
    exec {
        …
    }
}
but I am not sure about how the build cache is then unused
m
exec
inside doLast is not configuration-cache compatible, because it is a method of
Project
and causes the latter to be captured in the action closure. I think you can use
doFirst
to initialize
standardOutput
, similar to the workaround provided in https://github.com/gradle/gradle/issues/16535#issuecomment-1748786024
thank you 1
j
Oh, the task failed with other issue that is fixed in 8.3, but we can’t update yet. So probably didn’t get the issue you mentioned