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 AsyncConsumerActionExecutorconnection-
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 BuildLauncherforLaunchables(java.lang.Iterable<? extends Launchable> launchables)Sets the launchables to execute.BuildLauncherforLaunchables(Launchable... launchables)Sets the launchables to execute.BuildLauncherforTasks(java.lang.Iterable<? extends Task> tasks)Sets the tasks to be executed.BuildLauncherforTasks(java.lang.String... tasks)Sets the tasks to be executed.BuildLauncherforTasks(Task... tasks)Sets the tasks to be executed.protected DefaultBuildLaunchergetThis()protected voidpreprocessLaunchables(java.lang.Iterable<? extends Launchable> launchables)voidrun()Executes the build, blocking until it is complete.voidrun(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:
getThisin classAbstractLongRunningOperation<DefaultBuildLauncher>
-
forTasks
public BuildLauncher forTasks(java.lang.String... tasks)
Description copied from interface:BuildLauncherSets the tasks to be executed. If no tasks are specified, the project's default tasks are executed.- Specified by:
forTasksin 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:BuildLauncherSets 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:
forTasksin interfaceBuildLauncher- Parameters:
tasks- The tasks to be executed.- Returns:
- this
-
forTasks
public BuildLauncher forTasks(java.lang.Iterable<? extends Task> tasks)
Description copied from interface:BuildLauncherSets 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:
forTasksin interfaceBuildLauncher- Parameters:
tasks- The tasks to be executed.- Returns:
- this
-
forLaunchables
public BuildLauncher forLaunchables(Launchable... launchables)
Description copied from interface:BuildLauncherSets the launchables to execute. If no entries are specified, the project's default tasks are executed.- Specified by:
forLaunchablesin interfaceBuildLauncher- Parameters:
launchables- The launchables for this build.- Returns:
- this
-
forLaunchables
public BuildLauncher forLaunchables(java.lang.Iterable<? extends Launchable> launchables)
Description copied from interface:BuildLauncherSets the launchables to execute. If no entries are specified, the project's default tasks are executed.- Specified by:
forLaunchablesin 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:BuildLauncherExecutes the build, blocking until it is complete.- Specified by:
runin interfaceBuildLauncher
-
run
public void run(ResultHandler<? super java.lang.Void> handler)
Description copied from interface:BuildLauncherLaunches 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:
runin interfaceBuildLauncher- Parameters:
handler- The handler to supply the result to.
-
-