Package net.neoforged.nfrtgradle
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidabstract org.gradle.api.file.ConfigurableFileCollectionFiles added to this collection will be passed to NFRT via the--access-transformercommand line option.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.RegularFilePropertyThis retrieves the same asgetCompiledWithSourcesArtifact(), but doesn't include the sources in the Jar file.abstract org.gradle.api.file.RegularFilePropertyThis 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.ConfigurableFileCollectionFiles added to this collection will be passed to NFRT via the--interface-injection-datacommand 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-prefixcommand line parameter.abstract org.gradle.api.file.ConfigurableFileCollectionWhenParchment is enabled, this collection is expected to contain a single Parchment data file, which will be passed to NFRT using the--parchment-datacommand line parameter.abstract org.gradle.api.provider.Property<Boolean>Enables the use of Parchment data.abstract org.gradle.api.file.RegularFilePropertyAlso known as "client-extra".abstract org.gradle.api.file.RegularFilePropertyThis retrieves a Zip-File containing the sources used to compilegetCompiledArtifact().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-transformersto NFRT.Methods inherited from class net.neoforged.nfrtgradle.NeoFormRuntimeTask
addArtifactsToManifest, getExecOperations, getHomeDirectory, getJavaExecutable, getJavaToolchainService, getNeoFormRuntime, getVerbose, getWorkDirectory, runMethods 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, usesServiceMethods 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, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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-transformercommand 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-datacommand line option. -
getValidateAccessTransformers
If set to true, passes--validate-access-transformersto NFRT. Defaults to false. -
getParchmentEnabled
Enables the use of Parchment data. Defaults to false. -
getParchmentData
@InputFiles public abstract org.gradle.api.file.ConfigurableFileCollection getParchmentData()WhenParchment is enabled, this collection is expected to contain a single Parchment data file, which will be passed to NFRT using the--parchment-datacommand 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-prefixcommand 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-resultcommand line option. -
getNeoForgeArtifact
Gradle dependency notation for the NeoForge userdev artifact. Either this orgetNeoFormArtifact()must be specified. -
getNeoFormArtifact
Gradle dependency notation for the NeoForm data artifact. Either this orgetNeoForgeArtifact()must be specified. -
getEnableCache
Enables use of the NFRT cache. Defaults to true. Corresponds to the NFRT command line option--disable-cache. -
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
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 asgetCompiledWithSourcesArtifact(), 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 compilegetCompiledArtifact(). -
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()
-