Package com.modrinth.minotaur
Class TaskModrinthUpload
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.modrinth.minotaur.TaskModrinthUpload
- 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>
public abstract class TaskModrinthUpload
extends org.gradle.api.DefaultTask
A task used to communicate with Modrinth for the purpose of uploading build artifacts.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.Task.Namer -
Field Summary
FieldsModifier and TypeFieldDescriptionmasecla.modrinth4j.model.version.ProjectVersionThe response from the API when the file was uploaded successfully.Deprecated.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 TypeMethodDescriptionvoidapply()Defines what to do when the Modrinth upload task is invoked.abstract org.gradle.api.file.ConfigurableFileCollectionInput property used to add automatic task dependencies.booleanDeprecated.This check should be done manuallyMethods 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
-
Field Details
-
newVersion
@Nullable public masecla.modrinth4j.model.version.ProjectVersion newVersionThe response from the API when the file was uploaded successfully. -
uploadInfo
Deprecated.Please usenewVersioninsteadThe response from the API when the file was uploaded successfully.
-
-
Constructor Details
-
TaskModrinthUpload
public TaskModrinthUpload()
-
-
Method Details
-
wasUploadSuccessful
Deprecated.This check should be done manuallyChecks if the upload was successful or not.- Returns:
- Whether the file was successfully uploaded.
-
getWiredInputFiles
@InputFiles @Optional @Internal public abstract org.gradle.api.file.ConfigurableFileCollection getWiredInputFiles()Input property used to add automatic task dependencies.- Returns:
- property
-
apply
public void apply()Defines what to do when the Modrinth upload task is invoked.- Attempts to automatically resolve various metadata items if not specified, throwing an exception if some things still don't have anything set
- Resolves each file or task to be uploaded, ensuring they're all valid
- Uploads these files to the Modrinth API under a new version
ModrinthExtension.getFailSilently()is enabled, it won't fail the build if it fails to upload the version to Modrinth.
-
newVersioninstead