Class ModUtils

java.lang.Object
com.gtnewhorizons.retrofuturagradle.modutils.ModUtils

public class ModUtils extends Object
Gradle utilities for developing mods
  • Field Details

    • TASK_GROUP_INTERNAL

      protected static final String TASK_GROUP_INTERNAL
      See Also:
    • TASK_GROUP_USER

      protected static final String TASK_GROUP_USER
      See Also:
    • mixinSourceSet

      public final Property<SourceSet> mixinSourceSet
      The source set to enable mixin processing on, defaults to main.
    • DEOBFUSCATOR_TRANSFORMED

      public static final Attribute<Boolean> DEOBFUSCATOR_TRANSFORMED
      Attribute that controls running the deobfuscation artifact transform.
  • Constructor Details

  • Method Details

    • getLiveMirrorURL

      public String getLiveMirrorURL(int timeoutMillis, String... mirrors)
      Tries to connect to a set of URLs in parallel, returning the first URL that responds with a success HTTP code.
      Parameters:
      timeoutMillis - Timeout for connections made
      mirrors - The list of mirror URLs to try
      Returns:
      The live URL
      Throws:
      RuntimeException - If none of the URLs are live
    • deobfuscate

      public Object deobfuscate(Object depSpec)
      Wrap a dependency specification with a call to this function to make RFG deobfuscate it on resolution in MCP-mapped configurations.
    • enableMixins

      public Object enableMixins(Object mixinSpec, String refMapName)
      Wrap a mixin dependency specification with a call to this function to allow RFG to recognise the need for a refmap to be generated. The dependency should be declared as part of the annotationProcessor configuration
    • enableMixins

      public Object enableMixins(Object mixinSpec)