If I'd like to have the `standardOutput` of this t...
# community-support
g
If I'd like to have the
standardOutput
of this task
Copy code
val effXml by registering {
    workingDir = projectDir.parentFile.parentFile
    commandLine("sh", "-c", "mvn -B -f pom.xml help:effective-pom")
    standardOutput = ByteArrayOutputStream()
}
as the input of another one, there is no other way to use the classic Task Api with the annotation tags and go through a File, isn't?
v
Please reread your question and make sure you didn't mistype, because to me in is current state it doesn't make too much sense
g
output, sorry
v
Still not fully sure what you mean with the last sentence, but if I understood correctly, what hinders you to use outputs.file to register the result file as output ad-hoc and using the task as input for another task?
g
I was hoping in some Gradle magic 😄
v
That does what?
g
to grab the standardOutput as task output, but as far as I got, the only automatic output is the
ExecResult
v
You don't have a task of type
Exec
but a task of type
Task
you don't have any outputs. You just call the
exec
method at runtime of the task. And even if you would use a task of type
Exec
I don't think what you seek for is possible. Write the result to a file and use that as input, then you can also make the task and to be up-to-date.
👍 1