Class DownloadAssets

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
net.neoforged.nfrtgradle.NeoFormRuntimeTask
net.neoforged.nfrtgradle.DownloadAssets
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

@DisableCachingByDefault(because="Implements its own caching and the output file is system specific") @NonExtendable public abstract class DownloadAssets extends NeoFormRuntimeTask
Use the NFRT CLI to download the asset index and assets for the Minecraft version used by the underlying NeoForge/NeoForm configuration.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Task

    org.gradle.api.Task.Namer
  • Field Summary

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    abstract org.gradle.api.file.RegularFileProperty
    A properties file will be written to this location which can be read by the runtime tasks to determine where the asset index and asset root are located.
    abstract org.gradle.api.file.RegularFileProperty
    A properties file will be written to this location which can be read by the runtime tasks to determine where the asset index and asset root are located.
    abstract org.gradle.api.provider.Property<String>
    The Minecraft version to download the assets for.
    abstract org.gradle.api.provider.Property<String>
    Gradle dependency notation for the NeoForm data artifact, from which a Minecraft version will be derived.
    abstract org.gradle.api.provider.Property<String>
    Gradle dependency notation for the NeoForm data artifact, from which a Minecraft version will be derived.

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, getConvention, notCompatibleWithConfigurationCache
  • Constructor Details

    • DownloadAssets

      @Inject public DownloadAssets()
  • Method Details

    • getNeoForgeArtifact

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getNeoForgeArtifact()
      Gradle dependency notation for the NeoForm data artifact, from which a Minecraft version will be derived.

      To determine the Minecraft version, the following properties will be checked in-order and the first one will be used:

      1. getMinecraftVersion()
      2. getNeoFormArtifact()
      3. this property
    • getNeoFormArtifact

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getNeoFormArtifact()
      Gradle dependency notation for the NeoForm data artifact, from which a Minecraft version will be derived.

      To determine the Minecraft version, the following properties will be checked in-order and the first one will be used:

      1. getMinecraftVersion()
      2. this property
      3. getNeoForgeArtifact()
    • getMinecraftVersion

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getMinecraftVersion()
      The Minecraft version to download the assets for.

      To determine the Minecraft version, the following properties will be checked in-order and the first one will be used:

      1. this property
      2. getNeoFormArtifact()
      3. getNeoForgeArtifact()
    • getAssetPropertiesFile

      @OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getAssetPropertiesFile()
      A properties file will be written to this location which can be read by the runtime tasks to determine where the asset index and asset root are located.

      See --write-properties parameter of the download-asset command in NFRT.

    • getAssetJsonFile

      @OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getAssetJsonFile()
      A properties file will be written to this location which can be read by the runtime tasks to determine where the asset index and asset root are located.

      See --write-json parameter of the download-asset command in NFRT.

    • downloadAssets

      public void downloadAssets()