Interface RootProject

All Superinterfaces:
AutoCloseable, Project, ResourceProvider
All Known Implementing Classes:
AbstractRootProject, BootstrapRoot

public interface RootProject extends Project, AutoCloseable
Additional methods for the root project. Root projects are always created with an associated BuildContext. This context is closed when the root project is closed.
  • Method Details

    • prepareProject

      default void prepareProject(Project project) throws Exception

      May be overridden by the root project to apply common settings to projects of specific types or with specific properties.

      This method must be invoked by any base class for project configuration classes before it returns the control to the project configuration class' constructor. The method is never invoked by the user.

      This method is provided for convenience. Alternatively, project configuration classes can invoke any user defined method at the beginning of their constructor. Using this method simply makes sure that such an invocation is never forgotten.

      Parameters:
      project - the project to prepare
      Throws:
      Exception - the exception
    • projects

      Return the projects matching the pattern. The pattern is a glob pattern applied to the project's directory. ""matches the root project. "*" matches the root project and all immediate sub project. "**" matches all projects.
      Parameters:
      pattern - the pattern
      Returns:
      the stream
    • commandAlias

      Define an alias for requesting one or more specific resources.
      Parameters:
      name - the name
      Returns:
      the root project
    • close

      void close()
      Close the project. The re-declaration of this method removes the IOException, which is never thrown.
      Specified by:
      close in interface AutoCloseable