|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BuildLauncher
A BuildLauncher
allows you to configure and execute a Gradle build.
You use a BuildLauncher
as follows:
BuildLauncher
by calling ProjectConnection.newBuild()
.
run()
or run(ResultHandler)
to execute the build.
Instances of BuildLauncher
are not thread-safe.
Method Summary | |
---|---|
BuildLauncher |
addProgressListener(ProgressListener listener)
Adds a progress listener which will receive progress events as the operation runs. |
BuildLauncher |
forTasks(Iterable<? extends Task> tasks)
Sets the tasks to be executed. |
BuildLauncher |
forTasks(String... tasks)
Sets the tasks to be executed. |
BuildLauncher |
forTasks(Task... tasks)
Sets the tasks to be executed. |
void |
run()
Execute the build, blocking until it is complete. |
void |
run(ResultHandler<? super Void> handler)
Launchers the build. |
BuildLauncher |
setStandardError(OutputStream outputStream)
Sets the OutputStream which should receive standard error logging generated while running the operation. |
BuildLauncher |
setStandardInput(InputStream inputStream)
Sets the standard InputStream that will be used by builds. |
BuildLauncher |
setStandardOutput(OutputStream outputStream)
Sets the OutputStream which should receive standard output logging generated while running the operation. |
Method Detail |
---|
BuildLauncher forTasks(String... tasks)
tasks
- The paths of the tasks to be executed. Relative paths are evaluated relative to the project for which this launcher was created.
BuildLauncher forTasks(Task... tasks)
tasks
- The tasks to be executed.
BuildLauncher forTasks(Iterable<? extends Task> tasks)
tasks
- The tasks to be executed.
BuildLauncher setStandardOutput(OutputStream outputStream)
OutputStream
which should receive standard output logging generated while running the operation.
The default is to discard the output.
setStandardOutput
in interface LongRunningOperation
outputStream
- The output stream.
BuildLauncher setStandardError(OutputStream outputStream)
OutputStream
which should receive standard error logging generated while running the operation.
The default is to discard the output.
setStandardError
in interface LongRunningOperation
outputStream
- The output stream.
BuildLauncher setStandardInput(InputStream inputStream)
InputStream
that will be used by builds. Useful when the tooling api drives interactive builds.
setStandardInput
in interface LongRunningOperation
inputStream
- The input stream
BuildLauncher addProgressListener(ProgressListener listener)
addProgressListener
in interface LongRunningOperation
listener
- The listener
void run() throws GradleConnectionException
UnsupportedVersionException
- When the target Gradle version does not support the features required for this build.
BuildException
- On some failure executing the Gradle build.
GradleConnectionException
- On some other failure using the connection.
IllegalStateException
- When the connection has been closed or is closing.void run(ResultHandler<? super Void> handler) throws IllegalStateException
handler
- The handler to supply the result to.
IllegalStateException
- When the connection has been closed or is closing.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |