Interface MinecraftDependency

All Superinterfaces:
org.gradle.api.artifacts.Dependency, org.gradle.api.artifacts.ExternalDependency, org.gradle.api.artifacts.ExternalModuleDependency, org.gradle.api.attributes.HasAttributes, org.gradle.api.attributes.HasConfigurableAttributes<org.gradle.api.artifacts.ModuleDependency>, org.gradle.api.artifacts.ModuleDependency, org.gradle.api.artifacts.ModuleVersionSelector

public sealed interface MinecraftDependency extends org.gradle.api.artifacts.ExternalModuleDependency
  • Field Summary

    Fields inherited from interface org.gradle.api.artifacts.Dependency

    ARCHIVES_CONFIGURATION, CLASSIFIER, DEFAULT_CONFIGURATION
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Configures the AccessTransformer options for this project.
    default void
    accessTransformer(org.gradle.api.Action<? super net.minecraftforge.accesstransformers.gradle.AccessTransformersContainer.Options> options)
    Configures the AccessTransformer options for this project.
     
     
    default boolean
     
    void
    mappings(String channel, String version)
    Sets the mappings to use for the Minecraft Maven.
    default void
    mappings(Map namedArgs)
    Sets the mappings to use for the Minecraft Maven.
    void
    Sets the AccessTransformer configuration to use.
    void
    Sets the AccessTransformer configuration to use.
    void
    setAccessTransformer(org.gradle.api.file.RegularFile configFile)
    Sets the AccessTransformer configuration to use.
    void
    setAccessTransformer(org.gradle.api.provider.Provider<?> configFile)
    Sets the AccessTransformer configuration to use.
    setChanging(boolean changing)
     

    Methods inherited from interface org.gradle.api.artifacts.Dependency

    because, contentEquals, getGroup, getName, getReason, getVersion

    Methods inherited from interface org.gradle.api.artifacts.ExternalDependency

    getVersionConstraint, isForce, version

    Methods inherited from interface org.gradle.api.artifacts.ModuleDependency

    addArtifact, artifact, artifact, attributes, capabilities, doNotEndorseStrictVersions, endorseStrictVersions, exclude, getArtifacts, getAttributes, getCapabilitySelectors, getExcludeRules, getRequestedCapabilities, getTargetConfiguration, isEndorsingStrictVersions, isTransitive, setTargetConfiguration, setTransitive

    Methods inherited from interface org.gradle.api.artifacts.ModuleVersionSelector

    getGroup, getModule, getName, getVersion, matchesStrictly
  • Method Details

    • getMappings

    • mappings

      void mappings(String channel, String version)
      Sets the mappings to use for the Minecraft Maven.

      This method includes a generated named variant that can make declaration in your buildscript easier.

      
       minecraft {
           mappings channel: 'official', version: '1.21.5'
       }
       
      Parameters:
      channel - The mappings channel
      version - The mappings version
      Throws:
      IllegalArgumentException - If any parameter is null
      See Also:
      API Note:
      Mappings should only be declared once. A warning will be reported on re-declaration.
    • mappings

      @Contract default void mappings(Map namedArgs)

      Sets the mappings to use for the Minecraft Maven.

      This method is generated by Groovy in the implementing class, but has been included here for convenience and IDE support.

      Parameters:
      namedArgs - The named arguments
      Throws:
      IllegalArgumentException - If any parameter is null
      See Also:
      API Note:
      Mappings should only be declared once. A warning will be reported on re-declaration.
    • setAccessTransformer

      void setAccessTransformer(org.gradle.api.file.RegularFile configFile)
      Sets the AccessTransformer configuration to use.
      Parameters:
      configFile - The configuration file to use
    • setAccessTransformer

      void setAccessTransformer(File configFile)
      Sets the AccessTransformer configuration to use.
      Parameters:
      configFile - The configuration file to use
    • setAccessTransformer

      void setAccessTransformer(Object configFile)

      Sets the AccessTransformer configuration to use.

      The given object is resolved using Project.file(Object).

      Parameters:
      configFile - The configuration file to use
    • setAccessTransformer

      void setAccessTransformer(org.gradle.api.provider.Provider<?> configFile)

      Sets the AccessTransformer configuration to use.

      If the given provider does not provide a file or regular file, the result will be resolved using Project.file(Object), similarly to setAccessTransformer(Object).

      Parameters:
      configFile - The configuration file to use
    • accessTransformer

      default void accessTransformer(org.gradle.api.Action<? super net.minecraftforge.accesstransformers.gradle.AccessTransformersContainer.Options> options)
      Configures the AccessTransformer options for this project.
      Parameters:
      options - The options to apply
    • accessTransformer

      void accessTransformer(@DelegatesTo(value=net.minecraftforge.accesstransformers.gradle.AccessTransformersContainer.Options.class,strategy=1) Closure options)
      Configures the AccessTransformer options for this project.
      Parameters:
      options - The options to apply
    • isChanging

      default boolean isChanging()
      Specified by:
      isChanging in interface org.gradle.api.artifacts.ExternalModuleDependency
    • setChanging

      default MinecraftDependency setChanging(boolean changing)
      Specified by:
      setChanging in interface org.gradle.api.artifacts.ExternalModuleDependency
    • copy

      Specified by:
      copy in interface org.gradle.api.artifacts.Dependency
      Specified by:
      copy in interface org.gradle.api.artifacts.ExternalDependency
      Specified by:
      copy in interface org.gradle.api.artifacts.ExternalModuleDependency
      Specified by:
      copy in interface org.gradle.api.artifacts.ModuleDependency