Class UtilityModule
java.lang.Object
com.gtnewhorizons.gtnhgradle.modules.UtilityModule
- All Implemented Interfaces:
GTNHModule
Provides utility tasks and functions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Groovy-callable wrapper fordeobf(Project, String)
anddeobf(Project, String, String)
static class
Groovy-callable wrapper fordeobfCurse(Project, String)
static class
Groovy-callable wrapper fordeobfMaven(Project, String, String)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(@NotNull GTNHGradlePlugin.GTNHExtension gtnh, @NotNull Project project) Activates this module on the given project.static Object
Deprecated URL-based deobfuscation wrapperstatic Object
Deprecated URL-based deobfuscation wrapperstatic Object
deobfCurse
(Project project, String curseDep) Thin wrapper around cursemaven and rfg.deobf.static Object
deobfMaven
(Project project, String repoURL, String mavenDep) Deprecated by rfg.deobf, deobfuscate a maven dependencyboolean
isEnabled
(@NotNull PropertiesConfiguration configuration) static int
Replace SRG param names with MCP names
-
Constructor Details
-
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
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 interfaceGTNHModule
- Parameters:
gtnh
- The GTNH extension providing access to various gradle services and configurationproject
- The project to activate the module on- Throws:
Throwable
- Any exception to allow easier module writing
-
replaceParams
Replace SRG param names with MCP names- Parameters:
logger
- Logger to usefile
- Directory to scanparams
- SRG to MCP mappings- Returns:
- Files changed count
-
deobf
Deprecated URL-based deobfuscation wrapper- Parameters:
project
- Gradle project to usesourceURL
- The obfuscated jar URL- Returns:
- A dependency specification for the deobfed jar
-
deobf
Deprecated URL-based deobfuscation wrapper- Parameters:
project
- Gradle project to usesourceURL
- The obfuscated jar URLrawFileName
- Name for the file to cache- Returns:
- A dependency specification for the deobfed jar
-
deobfMaven
Deprecated by rfg.deobf, deobfuscate a maven dependency- Parameters:
project
- Gradle project to userepoURL
- URL of the maven repositorymavenDep
- GAV coordinates for the jar to deobfuscate- Returns:
- A dependency specification for the deobfed jar
-
deobfCurse
Thin wrapper around cursemaven and rfg.deobf.- Parameters:
project
- Gradle project to usecurseDep
- The curse PROJECT-FILE id pair- Returns:
- A dependency specification for the deobfed jar
-