|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
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
|
setJavaHome(File javaHome)
If the target gradle version supports it you can use this setting to specify the java home directory to use for the long running operation. |
LongRunningOperation
|
setJvmArguments(String... jvmArguments)
If the target gradle version supports it you can use this setting to specify the java vm arguments to use for the long running operation. |
LongRunningOperation
|
setStandardError(OutputStream outputStream)
Sets the OutputStream which should receive standard error logging generated while running the operation. |
LongRunningOperation
|
setStandardInput(InputStream inputStream)
If the target gradle version supports it you can use this setting to set the standard InputStream that will be used by builds. |
LongRunningOperation
|
setStandardOutput(OutputStream outputStream)
Sets the OutputStream which should receive standard output logging generated while running the operation. |
Method Detail |
---|
public LongRunningOperation addProgressListener(ProgressListener listener)
listener
- The listener
public LongRunningOperation setJavaHome(File javaHome)
If the target gradle version does not support it the long running operation will fail eagerly with UnsupportedMethodException when the operation is started.
BuildEnvironment model contains information such as java or gradle environment. If you want to get hold of this information you can ask tooling API to build this model.
If not configured or null passed the sensible default will be used.
javaHome
- to use for the gradle process
public LongRunningOperation setJvmArguments(String... jvmArguments)
If the target gradle version does not support it the long running operation will fail eagerly with UnsupportedMethodException when the operation is started.
BuildEnvironment model contains information such as java or gradle environment. If you want to get hold of this information you can ask tooling API to build this model.
If not configured or null passed the sensible default will be used.
jvmArguments
- to use for the gradle process
public LongRunningOperation setStandardError(OutputStream outputStream)
outputStream
- The output stream.
public LongRunningOperation setStandardInput(InputStream inputStream)
If the target gradle version does not support it the long running operation will fail eagerly with UnsupportedMethodException when the operation is started.
If not configured or null passed the dummy input stream with zero bytes is used to avoid the build hanging problems.
inputStream
- The input stream
public LongRunningOperation setStandardOutput(OutputStream outputStream)
outputStream
- The output stream.
Gradle API 1.0-milestone-8a