Record Class ModDevArtifactsWorkflow

java.lang.Object
java.lang.Record
net.neoforged.moddevgradle.internal.ModDevArtifactsWorkflow

@Internal public record ModDevArtifactsWorkflow(org.gradle.api.Project project, ModdingDependencies dependencies, VersionCapabilitiesInternal versionCapabilities, org.gradle.api.tasks.TaskProvider<CreateMinecraftArtifacts> createArtifacts, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> minecraftClassesDependency, org.gradle.api.tasks.TaskProvider<DownloadAssets> downloadAssets, org.gradle.api.artifacts.Configuration runtimeDependencies, org.gradle.api.artifacts.Configuration compileDependencies, org.gradle.api.provider.Provider<org.gradle.api.file.Directory> modDevBuildDir, org.gradle.api.provider.Provider<org.gradle.api.file.Directory> artifactsBuildDir) extends Record
The workflow needed to produce artifacts and assets for compiling and running a mod.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModDevArtifactsWorkflow(org.gradle.api.Project project, ModdingDependencies dependencies, VersionCapabilitiesInternal versionCapabilities, org.gradle.api.tasks.TaskProvider<CreateMinecraftArtifacts> createArtifacts, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> minecraftClassesDependency, org.gradle.api.tasks.TaskProvider<DownloadAssets> downloadAssets, org.gradle.api.artifacts.Configuration runtimeDependencies, org.gradle.api.artifacts.Configuration compileDependencies, org.gradle.api.provider.Provider<org.gradle.api.file.Directory> modDevBuildDir, org.gradle.api.provider.Provider<org.gradle.api.file.Directory> artifactsBuildDir)
    Creates an instance of a ModDevArtifactsWorkflow record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addToSourceSet(org.gradle.api.tasks.SourceSet sourceSet)
    Adds the compile-time and runtime-dependencies needed to compile mod code to the source-set of the given name.
    org.gradle.api.provider.Provider<org.gradle.api.file.Directory>
    Returns the value of the artifactsBuildDir record component.
    org.gradle.api.artifacts.Configuration
    Returns the value of the compileDependencies record component.
    create(org.gradle.api.Project project, Collection<org.gradle.api.tasks.SourceSet> enabledSourceSets, Branding branding, ModDevExtension extension, ModdingDependencies moddingDependencies, ArtifactNamingStrategy artifactNamingStrategy, org.gradle.api.artifacts.Configuration accessTransformers, org.gradle.api.artifacts.Configuration interfaceInjectionData, VersionCapabilitiesInternal versionCapabilities)
     
    org.gradle.api.tasks.TaskProvider<CreateMinecraftArtifacts>
    Returns the value of the createArtifacts record component.
    Returns the value of the dependencies record component.
    org.gradle.api.tasks.TaskProvider<DownloadAssets>
    Returns the value of the downloadAssets record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    get(org.gradle.api.Project project)
     
    final int
    Returns a hash code value for this object.
    org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency>
    Returns the value of the minecraftClassesDependency record component.
    org.gradle.api.provider.Provider<org.gradle.api.file.Directory>
    Returns the value of the modDevBuildDir record component.
    org.gradle.api.Project
    Returns the value of the project record component.
    org.gradle.api.provider.Provider<org.gradle.api.file.RegularFile>
     
    org.gradle.api.provider.Provider<org.gradle.api.file.RegularFile>
    requestAdditionalMinecraftArtifact(String id, org.gradle.api.provider.Provider<org.gradle.api.file.RegularFile> path)
     
    org.gradle.api.artifacts.Configuration
    Returns the value of the runtimeDependencies record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the versionCapabilities record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ModDevArtifactsWorkflow

      public ModDevArtifactsWorkflow(org.gradle.api.Project project, ModdingDependencies dependencies, VersionCapabilitiesInternal versionCapabilities, org.gradle.api.tasks.TaskProvider<CreateMinecraftArtifacts> createArtifacts, org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> minecraftClassesDependency, org.gradle.api.tasks.TaskProvider<DownloadAssets> downloadAssets, org.gradle.api.artifacts.Configuration runtimeDependencies, org.gradle.api.artifacts.Configuration compileDependencies, org.gradle.api.provider.Provider<org.gradle.api.file.Directory> modDevBuildDir, org.gradle.api.provider.Provider<org.gradle.api.file.Directory> artifactsBuildDir)
      Creates an instance of a ModDevArtifactsWorkflow record class.
      Parameters:
      project - the value for the project record component
      dependencies - the value for the dependencies record component
      versionCapabilities - the value for the versionCapabilities record component
      createArtifacts - the value for the createArtifacts record component
      minecraftClassesDependency - the value for the minecraftClassesDependency record component
      downloadAssets - the value for the downloadAssets record component
      runtimeDependencies - the value for the runtimeDependencies record component
      compileDependencies - the value for the compileDependencies record component
      modDevBuildDir - the value for the modDevBuildDir record component
      artifactsBuildDir - the value for the artifactsBuildDir record component
  • Method Details

    • get

      public static ModDevArtifactsWorkflow get(org.gradle.api.Project project)
    • create

      public static ModDevArtifactsWorkflow create(org.gradle.api.Project project, Collection<org.gradle.api.tasks.SourceSet> enabledSourceSets, Branding branding, ModDevExtension extension, ModdingDependencies moddingDependencies, ArtifactNamingStrategy artifactNamingStrategy, org.gradle.api.artifacts.Configuration accessTransformers, org.gradle.api.artifacts.Configuration interfaceInjectionData, VersionCapabilitiesInternal versionCapabilities)
    • addToSourceSet

      public void addToSourceSet(org.gradle.api.tasks.SourceSet sourceSet)
      Adds the compile-time and runtime-dependencies needed to compile mod code to the source-set of the given name.
    • requestAdditionalMinecraftArtifact

      public org.gradle.api.provider.Provider<org.gradle.api.file.RegularFile> requestAdditionalMinecraftArtifact(String id, String filename)
    • requestAdditionalMinecraftArtifact

      public org.gradle.api.provider.Provider<org.gradle.api.file.RegularFile> requestAdditionalMinecraftArtifact(String id, org.gradle.api.provider.Provider<org.gradle.api.file.RegularFile> path)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • project

      public org.gradle.api.Project project()
      Returns the value of the project record component.
      Returns:
      the value of the project record component
    • dependencies

      public ModdingDependencies dependencies()
      Returns the value of the dependencies record component.
      Returns:
      the value of the dependencies record component
    • versionCapabilities

      public VersionCapabilitiesInternal versionCapabilities()
      Returns the value of the versionCapabilities record component.
      Returns:
      the value of the versionCapabilities record component
    • createArtifacts

      public org.gradle.api.tasks.TaskProvider<CreateMinecraftArtifacts> createArtifacts()
      Returns the value of the createArtifacts record component.
      Returns:
      the value of the createArtifacts record component
    • minecraftClassesDependency

      public org.gradle.api.provider.Provider<? extends org.gradle.api.artifacts.Dependency> minecraftClassesDependency()
      Returns the value of the minecraftClassesDependency record component.
      Returns:
      the value of the minecraftClassesDependency record component
    • downloadAssets

      public org.gradle.api.tasks.TaskProvider<DownloadAssets> downloadAssets()
      Returns the value of the downloadAssets record component.
      Returns:
      the value of the downloadAssets record component
    • runtimeDependencies

      public org.gradle.api.artifacts.Configuration runtimeDependencies()
      Returns the value of the runtimeDependencies record component.
      Returns:
      the value of the runtimeDependencies record component
    • compileDependencies

      public org.gradle.api.artifacts.Configuration compileDependencies()
      Returns the value of the compileDependencies record component.
      Returns:
      the value of the compileDependencies record component
    • modDevBuildDir

      public org.gradle.api.provider.Provider<org.gradle.api.file.Directory> modDevBuildDir()
      Returns the value of the modDevBuildDir record component.
      Returns:
      the value of the modDevBuildDir record component
    • artifactsBuildDir

      public org.gradle.api.provider.Provider<org.gradle.api.file.Directory> artifactsBuildDir()
      Returns the value of the artifactsBuildDir record component.
      Returns:
      the value of the artifactsBuildDir record component