Interface BuildInitSpec

All Superinterfaces:
Describable

@Incubating public interface BuildInitSpec extends Describable
Represents a specification for a new type of project that the init task can generate.
Since:
8.12
Implementation Requirements:
Meant to be implemented by plugins that want to provide additional project types, with implementations being discoverable by a ServiceLoader.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    The name of the type of project this spec will generate.
    Returns the parameters that can be provided to configure this project during generation.
    An identifier for the type of project this spec will generate.
  • Method Details

    • getDisplayName

      default String getDisplayName()
      The name of the type of project this spec will generate.

      This will be used to allow the user to select a project type when running the init task. By default, this is the proper-cased version of getType().

      Specified by:
      getDisplayName in interface Describable
      Returns:
      a name providing a brief description of this type of project
      Since:
      8.12
    • getType

      String getType()
      An identifier for the type of project this spec will generate.

      This will be used to allow the user to select a project type when running the init task non-interactively by supplying the --type parameter to the init task.

      Each project type can be registered to only a single BuildInitGenerator.

      Returns:
      type id for this type of project
      Since:
      8.12
      Implementation Requirements:
      Must be unique amongst all project types contributed by a plugin.
    • getParameters

      default List<BuildInitParameter<?>> getParameters()
      Returns the parameters that can be provided to configure this project during generation.
      Returns:
      the parameters for this type of project specification
      Since:
      8.12