|
|||||||||
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 build executes. |
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 that should receive standard error logging from this build. |
BuildLauncher |
setStandardOutput(OutputStream outputStream)
Sets the OutputStream that should receive standard output logging from this build. |
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
that should receive standard output logging from this build. The default is to discard the output.
outputStream
- The output stream.
BuildLauncher setStandardError(OutputStream outputStream)
OutputStream
that should receive standard error logging from this build. The default is to discard the output.
outputStream
- The output stream.
BuildLauncher addProgressListener(ProgressListener listener)
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 |