Class GTNHGradlePlugin.GTNHExtension
java.lang.Object
com.gtnewhorizons.gtnhgradle.GTNHGradlePlugin.GTNHExtension
- All Implemented Interfaces:
ExtensionAware
- Enclosing class:
GTNHGradlePlugin
public abstract static class GTNHGradlePlugin.GTNHExtension
extends Object
implements ExtensionAware
The object registered as
project.gtnhGradle-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<Class<? extends GTNHModule>> A list of all available modules to activate@NotNull PropertiesConfigurationParsed properties associated with this projectfinal @NotNull LoggerLogging service used by the pluginstatic final Map<String, Class<? extends GTNHModule>> A map of all available modules, indexed by their class name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAllModules(Project project) Activates all available and enabled modules on the given project.voidapplyModuleByName(Project project, String name) Activates a module by its class name, if enabled in properties (e.g.abstract @NotNull ArchiveOperationsabstract @NotNull ExecOperationsabstract @NotNull FileSystemOperationsabstract @NotNull ObjectFactoryabstract @NotNull ProjectLayoutabstract @NotNull ProviderFactoryMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExtensionAware
getExtensions
-
Field Details
-
logger
Logging service used by the plugin -
configuration
Parsed properties associated with this project -
ALL_MODULES
A list of all available modules to activate -
MODULES_BY_NAME
A map of all available modules, indexed by their class name
-
-
Constructor Details
-
GTNHExtension
For internal use only.- Parameters:
project- passed in to avoid having to pass the project object to every apply function
-
-
Method Details
-
applyModuleByName
Activates a module by its class name, if enabled in properties (e.g.GitVersionModule).- Parameters:
project- The project to activate the module onname- Class name of the module, without the package name- Throws:
IllegalArgumentException- If the module was not found
-
applyAllModules
Activates all available and enabled modules on the given project.- Parameters:
project- The project to activate the modules on
-
getObjectFactory
- Returns:
- Gradle-provided injected service
-
getProviderFactory
- Returns:
- Gradle-provided injected service
-
getProjectLayout
- Returns:
- Gradle-provided injected service
-
getFileSystemOperations
- Returns:
- Gradle-provided injected service
-
getArchiveOperations
- Returns:
- Gradle-provided injected service
-
getExecOperations
- Returns:
- Gradle-provided injected service
-