Package com.gtnewhorizons.gtnhgradle
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 PropertiesConfiguration
Parsed properties associated with this projectfinal @NotNull Logger
Logging 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 TypeMethodDescriptionvoid
applyAllModules
(Project project) Activates all available and enabled modules on the given project.void
applyModuleByName
(Project project, String name) Activates a module by its class name, if enabled in properties (e.g.abstract @NotNull ArchiveOperations
abstract @NotNull ExecOperations
abstract @NotNull FileSystemOperations
abstract @NotNull ObjectFactory
abstract @NotNull ProjectLayout
abstract @NotNull ProviderFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gradle.api.plugins.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
-