Class DefaultBuildLauncher
- java.lang.Object
-
- org.gradle.tooling.internal.consumer.AbstractLongRunningOperation<DefaultBuildLauncher>
-
- org.gradle.tooling.internal.consumer.DefaultBuildLauncher
-
- All Implemented Interfaces:
BuildLauncher
,ConfigurableLauncher<BuildLauncher>
,LongRunningOperation
public class DefaultBuildLauncher extends AbstractLongRunningOperation<DefaultBuildLauncher> implements BuildLauncher
-
-
Field Summary
Fields Modifier and Type Field Description protected AsyncConsumerActionExecutor
connection
-
Fields inherited from class org.gradle.tooling.internal.consumer.AbstractLongRunningOperation
connectionParameters, operationParamsBuilder
-
-
Constructor Summary
Constructors Constructor Description DefaultBuildLauncher(AsyncConsumerActionExecutor connection, ConnectionParameters parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildLauncher
forLaunchables(java.lang.Iterable<? extends Launchable> launchables)
Sets the launchables to execute.BuildLauncher
forLaunchables(Launchable... launchables)
Sets the launchables to execute.BuildLauncher
forTasks(java.lang.Iterable<? extends Task> tasks)
Sets the tasks to be executed.BuildLauncher
forTasks(java.lang.String... tasks)
Sets the tasks to be executed.BuildLauncher
forTasks(Task... tasks)
Sets the tasks to be executed.protected DefaultBuildLauncher
getThis()
protected void
preprocessLaunchables(java.lang.Iterable<? extends Launchable> launchables)
void
run()
Executes the build, blocking until it is complete.void
run(ResultHandler<? super java.lang.Void> handler)
Launches the build.-
Methods inherited from class org.gradle.tooling.internal.consumer.AbstractLongRunningOperation
addArguments, addArguments, addJvmArguments, addJvmArguments, addProgressListener, addProgressListener, addProgressListener, addProgressListener, copyFrom, getConsumerOperationParameters, rationalizeInput, rationalizeInput, setColorOutput, setEnvironmentVariables, setJavaHome, setJvmArguments, setJvmArguments, setStandardError, setStandardInput, setStandardOutput, withArguments, withArguments, withCancellationToken, withInjectedClassPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.tooling.ConfigurableLauncher
addArguments, addArguments, addJvmArguments, addJvmArguments, addProgressListener, addProgressListener, addProgressListener, addProgressListener, setColorOutput, setEnvironmentVariables, setJavaHome, setJvmArguments, setJvmArguments, setStandardError, setStandardInput, setStandardOutput, withArguments, withArguments, withCancellationToken
-
-
-
-
Field Detail
-
connection
protected final AsyncConsumerActionExecutor connection
-
-
Constructor Detail
-
DefaultBuildLauncher
public DefaultBuildLauncher(AsyncConsumerActionExecutor connection, ConnectionParameters parameters)
-
-
Method Detail
-
getThis
protected DefaultBuildLauncher getThis()
- Specified by:
getThis
in classAbstractLongRunningOperation<DefaultBuildLauncher>
-
forTasks
public BuildLauncher forTasks(java.lang.String... tasks)
Description copied from interface:BuildLauncher
Sets the tasks to be executed. If no tasks are specified, the project's default tasks are executed.- Specified by:
forTasks
in interfaceBuildLauncher
- 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)
Description copied from interface:BuildLauncher
Sets the tasks to be executed. If no tasks are specified, the project's default tasks are executed.Note that the supplied tasks do not necessarily need to belong to the project which this launcher was created for.
- Specified by:
forTasks
in interfaceBuildLauncher
- Parameters:
tasks
- The tasks to be executed.- Returns:
- this
-
forTasks
public BuildLauncher forTasks(java.lang.Iterable<? extends Task> tasks)
Description copied from interface:BuildLauncher
Sets the tasks to be executed. If no tasks are specified, the project's default tasks are executed.Note that the supplied tasks do not necessarily need to belong to the project which this launcher was created for.
- Specified by:
forTasks
in interfaceBuildLauncher
- Parameters:
tasks
- The tasks to be executed.- Returns:
- this
-
forLaunchables
public BuildLauncher forLaunchables(Launchable... launchables)
Description copied from interface:BuildLauncher
Sets the launchables to execute. If no entries are specified, the project's default tasks are executed.- Specified by:
forLaunchables
in interfaceBuildLauncher
- Parameters:
launchables
- The launchables for this build.- Returns:
- this
-
forLaunchables
public BuildLauncher forLaunchables(java.lang.Iterable<? extends Launchable> launchables)
Description copied from interface:BuildLauncher
Sets the launchables to execute. If no entries are specified, the project's default tasks are executed.- Specified by:
forLaunchables
in interfaceBuildLauncher
- Parameters:
launchables
- The launchables for this build.- Returns:
- this
-
preprocessLaunchables
protected void preprocessLaunchables(java.lang.Iterable<? extends Launchable> launchables)
-
run
public void run()
Description copied from interface:BuildLauncher
Executes the build, blocking until it is complete.- Specified by:
run
in interfaceBuildLauncher
-
run
public void run(ResultHandler<? super java.lang.Void> handler)
Description copied from interface:BuildLauncher
Launches the build. This method returns immediately, and the result is later passed to the given handler.If the operation fails, the handler's
ResultHandler.onFailure(GradleConnectionException)
method is called with the appropriate exception. SeeBuildLauncher.run()
for a description of the various exceptions that the operation may fail with.- Specified by:
run
in interfaceBuildLauncher
- Parameters:
handler
- The handler to supply the result to.
-
-