Package com.vaadin.copilot
Enum Class BuildTool
- All Implemented Interfaces:
Serializable,Comparable<BuildTool>,Constable
The build tool used by a project or module, detected from the build file
present in its root folder.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA build tool detected in a specific folder.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<BuildTool.Detected> Detects the build tool used in the given folder.The name of the build file this build tool is detected by.static BuildToolReturns the enum constant of this class with the specified name.static BuildTool[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MAVEN
-
GRADLE_GROOVY
-
GRADLE_KOTLIN
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getBuildFileName
The name of the build file this build tool is detected by.- Returns:
- the build file name, e.g.
pom.xml
-
detect
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
-