Class DefaultBuildLauncher

    • Method Detail

      • 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 interface BuildLauncher
        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 interface BuildLauncher
        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 interface BuildLauncher
        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 interface BuildLauncher
        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 interface BuildLauncher
        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 interface BuildLauncher
      • 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. See BuildLauncher.run() for a description of the various exceptions that the operation may fail with.

        Specified by:
        run in interface BuildLauncher
        Parameters:
        handler - The handler to supply the result to.