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 Details

    • logger

      @NotNull public final @NotNull Logger logger
      Logging service used by the plugin
    • configuration

      @NotNull public @NotNull PropertiesConfiguration configuration
      Parsed properties associated with this project
    • ALL_MODULES

      public static final List<Class<? extends GTNHModule>> ALL_MODULES
      A list of all available modules to activate
    • MODULES_BY_NAME

      public static final Map<String,Class<? extends GTNHModule>> MODULES_BY_NAME
      A map of all available modules, indexed by their class name
  • Constructor Details

    • GTNHExtension

      @Inject @Internal public GTNHExtension(Project project)
      For internal use only.
      Parameters:
      project - passed in to avoid having to pass the project object to every apply function
  • Method Details

    • applyModuleByName

      public void applyModuleByName(Project project, String name)
      Activates a module by its class name, if enabled in properties (e.g. GitVersionModule).
      Parameters:
      project - The project to activate the module on
      name - Class name of the module, without the package name
      Throws:
      IllegalArgumentException - If the module was not found
    • applyAllModules

      public void applyAllModules(Project project)
      Activates all available and enabled modules on the given project.
      Parameters:
      project - The project to activate the modules on
    • getObjectFactory

      @Inject @NotNull public abstract @NotNull ObjectFactory getObjectFactory()
      Returns:
      Gradle-provided injected service
    • getProviderFactory

      @Inject @NotNull public abstract @NotNull ProviderFactory getProviderFactory()
      Returns:
      Gradle-provided injected service
    • getProjectLayout

      @Inject @NotNull public abstract @NotNull ProjectLayout getProjectLayout()
      Returns:
      Gradle-provided injected service
    • getFileSystemOperations

      @Inject @NotNull public abstract @NotNull FileSystemOperations getFileSystemOperations()
      Returns:
      Gradle-provided injected service
    • getArchiveOperations

      @Inject @NotNull public abstract @NotNull ArchiveOperations getArchiveOperations()
      Returns:
      Gradle-provided injected service
    • getExecOperations

      @Inject @NotNull public abstract @NotNull ExecOperations getExecOperations()
      Returns:
      Gradle-provided injected service