JavaExec include Java command in standard output stream

I have several JavaExec tasks and I want to redirect the standard output to the same file.

However the output is very hard to read as there is no separation in the output from one task to the start of the other.

Ideally I want to see the Java command itself in the log file, is this do able? If so how?


No built in sugar for this.

One way would be to manually write it to the file in a doFirst() action added to that task.