Groovy Documentation

org.gradle.tooling
[Java] Interface BuildLauncher

org.gradle.tooling.BuildLauncher
  org.gradle.tooling.LongRunningOperation
All Superinterfaces:
LongRunningOperation

public interface BuildLauncher
extends LongRunningOperation

A BuildLauncher allows you to configure and execute a Gradle build.

You use a BuildLauncher as follows:

Instances of BuildLauncher are not thread-safe.


Method Summary
BuildLauncher addProgressListener(ProgressListener listener)

{@inheritDoc}

BuildLauncher forTasks(java.lang.String... tasks)

Sets the tasks to be executed.

BuildLauncher forTasks(Task... tasks)

Sets the tasks to be executed.

BuildLauncher forTasks(java.lang.Iterable tasks)

Sets the tasks to be executed.

void run()

Execute the build, blocking until it is complete.

void run(ResultHandler handler)

Launchers the build.

BuildLauncher setStandardError(java.io.OutputStream outputStream)

{@inheritDoc}

BuildLauncher setStandardInput(java.io.InputStream inputStream)

{@inheritDoc}

BuildLauncher setStandardOutput(java.io.OutputStream outputStream)

{@inheritDoc}

 
Methods inherited from interface LongRunningOperation
addProgressListener, setStandardError, setStandardInput, setStandardOutput
 

Method Detail

addProgressListener

public BuildLauncher addProgressListener(ProgressListener listener)
{@inheritDoc}


forTasks

public BuildLauncher forTasks(java.lang.String... tasks)
Sets the tasks to be executed.
Parameters:
tasks - The paths of the tasks to be executed. Relative paths are evaluated relative to the project for which this launcher was created.
Returns:
this


forTasks

public BuildLauncher forTasks(Task... tasks)
Sets the tasks to be executed. Note that the supplied tasks do not necessarily belong to the project which this launcher was created for.
Parameters:
tasks - The tasks to be executed.
Returns:
this


forTasks

public BuildLauncher forTasks(java.lang.Iterable tasks)
Sets the tasks to be executed. Note that the supplied tasks do not necessarily belong to the project which this launcher was created for.
Parameters:
tasks - The tasks to be executed.
Returns:
this


run

public void run()
Execute the build, blocking until it is complete.
throws:
UnsupportedVersionException When the target Gradle version does not support the features required for this build.
throws:
BuildException On some failure executing the Gradle build.
throws:
GradleConnectionException On some other failure using the connection.
throws:
IllegalStateException When the connection has been closed or is closing.


run

public void run(ResultHandler handler)
Launchers the build. This method returns immediately, and the result is later passed to the given handler.
throws:
IllegalStateException When the connection has been closed or is closing.
Parameters:
handler - The handler to supply the result to.


setStandardError

public BuildLauncher setStandardError(java.io.OutputStream outputStream)
{@inheritDoc}


setStandardInput

public BuildLauncher setStandardInput(java.io.InputStream inputStream)
{@inheritDoc}


setStandardOutput

public BuildLauncher setStandardOutput(java.io.OutputStream outputStream)
{@inheritDoc}


 

Groovy Documentation