Class CreateMinecraftArtifacts

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
net.neoforged.nfrtgradle.NeoFormRuntimeTask
net.neoforged.nfrtgradle.CreateMinecraftArtifacts
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") @NonExtendable public abstract class CreateMinecraftArtifacts extends NeoFormRuntimeTask
The primary task for creating the Minecraft artifacts that mods will be compiled against, using the NFRT CLI.
  • 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.ConfigurableFileCollection
    Files added to this collection will be passed to NFRT via the --access-transformer command line option.
    abstract org.gradle.api.provider.MapProperty<String,File>
    This property can be used to access additional results of the NeoForm process being run by NFRT.
    abstract org.gradle.api.provider.Property<Boolean>
    When the cache is enabled and this is set to true, additional details will be printed to the console when a cache miss occurs.
    abstract org.gradle.api.file.RegularFileProperty
    This retrieves the same as getCompiledWithSourcesArtifact(), but doesn't include the sources in the Jar file.
    abstract org.gradle.api.file.RegularFileProperty
    This retrieves the result of the NeoForm process that produces a compiled Minecraft jar that includes the Minecraft sources as well.
    abstract org.gradle.api.provider.Property<Boolean>
    Enables use of the NFRT cache.
    abstract org.gradle.api.file.ConfigurableFileCollection
    Files added to this collection will be passed to NFRT via the --interface-injection-data command line option.
    abstract org.gradle.api.provider.Property<String>
    Gradle dependency notation for the NeoForge userdev artifact.
    abstract org.gradle.api.provider.Property<String>
    Gradle dependency notation for the NeoForm data artifact.
    abstract org.gradle.api.provider.Property<String>
    When this property is set to a non-blank string, it will be passed to NFRT using the --parchment-conflict-prefix command line parameter.
    abstract org.gradle.api.file.ConfigurableFileCollection
    When Parchment is enabled, this collection is expected to contain a single Parchment data file, which will be passed to NFRT using the --parchment-data command line parameter.
    abstract org.gradle.api.provider.Property<Boolean>
    Enables the use of Parchment data.
    abstract org.gradle.api.file.RegularFileProperty
    Also known as "client-extra".
    abstract org.gradle.api.file.RegularFileProperty
    This retrieves a Zip-File containing the sources used to compile getCompiledArtifact().
    abstract org.gradle.api.provider.Property<Boolean>
    Set this to true to enable the use of the Eclipse Java Compiler to produce the compiled Minecraft artifacts.
    abstract org.gradle.api.provider.Property<Boolean>
    If set to true, passes --validate-access-transformers to NFRT.

    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

    • CreateMinecraftArtifacts

      @Inject public CreateMinecraftArtifacts()
  • Method Details

    • getAccessTransformers

      @InputFiles public abstract org.gradle.api.file.ConfigurableFileCollection getAccessTransformers()
      Files added to this collection will be passed to NFRT via the --access-transformer command line option.
    • getInterfaceInjectionData

      @InputFiles public abstract org.gradle.api.file.ConfigurableFileCollection getInterfaceInjectionData()
      Files added to this collection will be passed to NFRT via the --interface-injection-data command line option.
    • getValidateAccessTransformers

      @Input public abstract org.gradle.api.provider.Property<Boolean> getValidateAccessTransformers()
      If set to true, passes --validate-access-transformers to NFRT. Defaults to false.
    • getParchmentEnabled

      @Input public abstract org.gradle.api.provider.Property<Boolean> getParchmentEnabled()
      Enables the use of Parchment data. Defaults to false.
    • getParchmentData

      @InputFiles public abstract org.gradle.api.file.ConfigurableFileCollection getParchmentData()
      When Parchment is enabled, this collection is expected to contain a single Parchment data file, which will be passed to NFRT using the --parchment-data command line parameter.
    • getParchmentConflictResolutionPrefix

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getParchmentConflictResolutionPrefix()
      When this property is set to a non-blank string, it will be passed to NFRT using the --parchment-conflict-prefix command line parameter.
    • getAdditionalResults

      @OutputFiles public abstract org.gradle.api.provider.MapProperty<String,File> getAdditionalResults()
      This property can be used to access additional results of the NeoForm process being run by NFRT. The map key is the ID of the result while the value is the output file where that result should be written. Trying to set a non-existent result will result in an error, but print available results to the console. Entries in this map will be passed to NFRT using the --write-result command line option.
    • getNeoForgeArtifact

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getNeoForgeArtifact()
      Gradle dependency notation for the NeoForge userdev artifact. Either this or getNeoFormArtifact() must be specified.
    • getNeoFormArtifact

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getNeoFormArtifact()
      Gradle dependency notation for the NeoForm data artifact. Either this or getNeoForgeArtifact() must be specified.
    • getEnableCache

      @Internal public abstract org.gradle.api.provider.Property<Boolean> getEnableCache()
      Enables use of the NFRT cache. Defaults to true. Corresponds to the NFRT command line option --disable-cache.
    • getAnalyzeCacheMisses

      @Internal public abstract org.gradle.api.provider.Property<Boolean> getAnalyzeCacheMisses()
      When the cache is enabled and this is set to true, additional details will be printed to the console when a cache miss occurs. Corresponds to the NFRT command line option --analyze-cache-misses.
    • getUseEclipseCompiler

      @Input public abstract org.gradle.api.provider.Property<Boolean> getUseEclipseCompiler()
      Set this to true to enable the use of the Eclipse Java Compiler to produce the compiled Minecraft artifacts. Defaults to false. Corresponds to the NFRT command line option --use-eclipse-compiler.
    • getCompiledWithSourcesArtifact

      @OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getCompiledWithSourcesArtifact()
      This retrieves the result of the NeoForm process that produces a compiled Minecraft jar that includes the Minecraft sources as well. This is useful for working around IntelliJ limitations related to not being able to attach sources as a separate artifact automatically.
    • getCompiledArtifact

      @OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getCompiledArtifact()
      This retrieves the same as getCompiledWithSourcesArtifact(), but doesn't include the sources in the Jar file.
    • getSourcesArtifact

      @OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getSourcesArtifact()
      This retrieves a Zip-File containing the sources used to compile getCompiledArtifact().
    • getResourcesArtifact

      @OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getResourcesArtifact()
      Also known as "client-extra". Contains the non-class files from the original Minecraft jar (excluding META-INF).
    • createArtifacts

      public void createArtifacts()