Enum Class BuildTool

java.lang.Object
java.lang.Enum<BuildTool>
com.vaadin.copilot.BuildTool
All Implemented Interfaces:
Serializable, Comparable<BuildTool>, Constable

public enum BuildTool extends Enum<BuildTool>
The build tool used by a project or module, detected from the build file present in its root folder.
  • Enum Constant Details

    • MAVEN

      public static final BuildTool MAVEN
    • GRADLE_GROOVY

      public static final BuildTool GRADLE_GROOVY
    • GRADLE_KOTLIN

      public static final BuildTool GRADLE_KOTLIN
  • Method Details

    • values

      public static BuildTool[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BuildTool valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getBuildFileName

      public String getBuildFileName()
      The name of the build file this build tool is detected by.
      Returns:
      the build file name, e.g. pom.xml
    • detect

      public static Optional<BuildTool.Detected> detect(Path moduleRoot)
      Detects the build tool used in the given folder.

      The folder is normally a module root, so that in a multi-module project the module's own build file is found rather than the aggregator's.

      Parameters:
      moduleRoot - the folder to look in
      Returns:
      the detected build tool and its build file, or Optional.empty() if the folder has no recognised build file