Groovy Documentation

org.gradle.tooling
[Java] Interface LongRunningOperation


public interface LongRunningOperation

Offers ways to communicate both ways with a gradle operation, be it building a model or running tasks.

Enables tracking progress via listeners that will receive events from the gradle operation.

Allows providing standard output streams that will receive output if the gradle operation writes to standard streams.

Allows providing standard input that can be consumed by the gradle operation (useful for interactive builds).


Method Summary
LongRunningOperation addProgressListener(ProgressListener listener)

Adds a progress listener which will receive progress events as the operation runs.

LongRunningOperation setStandardError(java.io.OutputStream outputStream)

Sets the java.io.OutputStream which should receive standard error logging generated while running the operation.

LongRunningOperation setStandardInput(java.io.InputStream inputStream)

Sets the standard java.io.InputStream that will be used by builds.

LongRunningOperation setStandardOutput(java.io.OutputStream outputStream)

Sets the java.io.OutputStream which should receive standard output logging generated while running the operation.

 

Method Detail

addProgressListener

public LongRunningOperation addProgressListener(ProgressListener listener)
Adds a progress listener which will receive progress events as the operation runs.
Parameters:
listener - The listener
Returns:
this


setStandardError

public LongRunningOperation setStandardError(java.io.OutputStream outputStream)
Sets the java.io.OutputStream which should receive standard error logging generated while running the operation. The default is to discard the output.
Parameters:
outputStream - The output stream.
Returns:
this


setStandardInput

public LongRunningOperation setStandardInput(java.io.InputStream inputStream)
Sets the standard java.io.InputStream that will be used by builds. Useful when the tooling api drives interactive builds.
Parameters:
inputStream - The input stream
Returns:
this


setStandardOutput

public LongRunningOperation setStandardOutput(java.io.OutputStream outputStream)
Sets the java.io.OutputStream which should receive standard output logging generated while running the operation. The default is to discard the output.
Parameters:
outputStream - The output stream.
Returns:
this


 

Groovy Documentation