Interface BuildSystem

All Known Implementing Classes:
GradleBuildSystem, MavenBuildSystem

public interface BuildSystem
A build system that can be used by a generated project.
Author:
Andy Wilkinson, Moritz Halbritter
  • Method Details

    • id

      String id()
      The id of the build system.
      Returns:
      the id
    • dialect

      default @Nullable String dialect()
      The dialect of the build system, or null if the build system does not support multiple dialects.
      Returns:
      the dialect or null
    • getMainSource

      default SourceStructure getMainSource(Path projectRoot, Language language)
      Returns a SourceStructure for main sources.
      Parameters:
      projectRoot - the root of the project structure
      language - the language of the project
      Returns:
      a SourceStructure for main assets
    • getTestSource

      default SourceStructure getTestSource(Path projectRoot, Language language)
      Returns a SourceStructure for test sources.
      Parameters:
      projectRoot - the root of the project structure
      language - the language of the project
      Returns:
      a SourceStructure for test assets
    • getSource

      default SourceStructure getSource(Path projectRoot, Language language, SourceSet sourceSet)
      Returns a SourceStructure for the sources of the given source set.
      Parameters:
      projectRoot - the root of the project structure
      language - the language of the project
      sourceSet - the source set
      Returns:
      a SourceStructure for the assets of the source set
    • forId

      static BuildSystem forId(String id)
      Return the BuildSystem with the given id.
      Parameters:
      id - the id of the build system
      Returns:
      the build system
      Throws:
      IllegalStateException - if no build system matches
    • forIdAndDialect

      static BuildSystem forIdAndDialect(@Nullable String id, @Nullable String dialect)
      Return the BuildSystem with the given id and dialect.
      Parameters:
      id - the id of the build system
      dialect - the dialect of the build system, or null
      Returns:
      the build system
      Throws:
      IllegalStateException - if no build system matches