Class GitVersionModule
java.lang.Object
com.gtnewhorizons.gtnhgradle.modules.GitVersionModule
- All Implemented Interfaces:
GTNHModule
First checks for a valid git repository in the project, if not found does nothing. Applies the
com.palantir.git-version
plugin and sets the project version based on the latest git tag and commit
hash. Can be disabled by setting a VERSION environment variable.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(@NotNull GTNHGradlePlugin.GTNHExtension gtnh, @NotNull Project project) Activates this module on the given project.boolean
isEnabled
(@NotNull PropertiesConfiguration configuration)
-
Constructor Details
-
GitVersionModule
public GitVersionModule()
-
-
Method Details
-
isEnabled
- Specified by:
isEnabled
in interfaceGTNHModule
- Parameters:
configuration
- The project configuration- Returns:
- If this module should be enabled for the input project settings
-
apply
Description copied from interface:GTNHModule
Activates this module on the given project.- Specified by:
apply
in interfaceGTNHModule
- Parameters:
gtnh
- The GTNH extension providing access to various gradle services and configurationproject
- The project to activate the module on
-