Slackbot
10/05/2023, 8:26 AMJavi
10/05/2023, 8:56 AMMikhail Lopatkin
10/05/2023, 2:58 PMdoLast {
println(standardOutput.toString())
}
? Or a TaskProvider.map { }
? I see that the Exec
javadoc suggests using ext
, but that wouldn't work with CC either.Javi
10/05/2023, 3:00 PMstandardOutput.toString().trim()
Javi
10/05/2023, 3:00 PMdoLast {
exec {
…
}
}
Javi
10/05/2023, 3:01 PMMikhail Lopatkin
10/05/2023, 3:04 PMexec
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-1748786024Javi
10/05/2023, 3:06 PM