Class UtilityModule

java.lang.Object
com.gtnewhorizons.gtnhgradle.modules.UtilityModule
All Implemented Interfaces:
GTNHModule

public class UtilityModule extends Object implements GTNHModule
Provides utility tasks and functions
  • Constructor Details Link icon

    • UtilityModule Link icon

      public UtilityModule()
  • Method Details Link icon

    • isEnabled Link icon

      public boolean isEnabled(@NotNull @NotNull PropertiesConfiguration configuration)
      Specified by:
      isEnabled in interface GTNHModule
      Parameters:
      configuration - The project configuration
      Returns:
      If this module should be enabled for the input project settings
    • apply Link icon

      public void apply(@NotNull GTNHGradlePlugin.GTNHExtension gtnh, @NotNull @NotNull Project project) throws Throwable
      Description copied from interface: GTNHModule
      Activates this module on the given project.
      Specified by:
      apply in interface GTNHModule
      Parameters:
      gtnh - The GTNH extension providing access to various gradle services and configuration
      project - The project to activate the module on
      Throws:
      Throwable - Any exception to allow easier module writing
    • replaceParams Link icon

      public static int replaceParams(Logger logger, File file, Map<String,String> params)
      Replace SRG param names with MCP names
      Parameters:
      logger - Logger to use
      file - Directory to scan
      params - SRG to MCP mappings
      Returns:
      Files changed count
    • deobf Link icon

      public static Object deobf(Project project, String sourceURL)
      Deprecated URL-based deobfuscation wrapper
      Parameters:
      project - Gradle project to use
      sourceURL - The obfuscated jar URL
      Returns:
      A dependency specification for the deobfed jar
    • deobf Link icon

      public static Object deobf(Project project, String sourceURL, String rawFileName)
      Deprecated URL-based deobfuscation wrapper
      Parameters:
      project - Gradle project to use
      sourceURL - The obfuscated jar URL
      rawFileName - Name for the file to cache
      Returns:
      A dependency specification for the deobfed jar
    • deobfMaven Link icon

      public static Object deobfMaven(Project project, String repoURL, String mavenDep)
      Deprecated by rfg.deobf, deobfuscate a maven dependency
      Parameters:
      project - Gradle project to use
      repoURL - URL of the maven repository
      mavenDep - GAV coordinates for the jar to deobfuscate
      Returns:
      A dependency specification for the deobfed jar
    • deobfCurse Link icon

      public static Object deobfCurse(Project project, String curseDep)
      Thin wrapper around cursemaven and rfg.deobf.
      Parameters:
      project - Gradle project to use
      curseDep - The curse PROJECT-FILE id pair
      Returns:
      A dependency specification for the deobfed jar