Package com.konfigyr.gradle
Class PublishArtifactMetadataTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.konfigyr.gradle.PublishArtifactMetadataTask
- 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="Performs a network call against a stateful remote service")
public abstract class PublishArtifactMetadataTask
extends org.gradle.api.DefaultTask
Task that publishes this project's own
ArtifactMetadata, generated by
GenerateArtifactMetadataTask, directly to the Konfigyr Artifactory.
If this project's own jar does not expose Spring Boot configuration metadata, this task has
nothing to publish and does nothing. Publishing requires the namespace holding this project's
groupId to be verified by the Konfigyr Artifactory, if it isn't, the underlying call
fails with an HttpResponseException, which this task lets propagate rather than
special-casing.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.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 TypeMethodDescriptionabstract org.gradle.api.file.RegularFilePropertyThe file containing this project's own serializedArtifactMetadata, written byGenerateArtifactMetadataTask.abstract org.gradle.api.provider.Property<Boolean> Whether the registry named bygetRegistryName()is fully configured (aurland eitherclientCredentials { }ortokenExchange { }grant).abstract org.gradle.api.provider.Property<@NonNull String> The name of the registry this task publishes to.abstract org.gradle.api.provider.Property<@NonNull Duration> The initial time interval in milliseconds between consecutive polling attempts to check for a release.abstract org.gradle.api.provider.Property<@NonNull Duration> The maximum time in milliseconds to wait for a successful poll of a release.abstract org.gradle.api.provider.Property<ArtifactoryService> Returns theArtifactoryServiceto use for publishing the artifact metadata.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, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, 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, notCompatibleWithConfigurationCache
-
Constructor Details
-
PublishArtifactMetadataTask
public PublishArtifactMetadataTask()
-
-
Method Details
-
getService
Returns theArtifactoryServiceto use for publishing the artifact metadata.- Returns:
- the artifactory service to use, never null.
-
getMetadata
@Internal public abstract org.gradle.api.file.RegularFileProperty getMetadata()The file containing this project's own serializedArtifactMetadata, written byGenerateArtifactMetadataTask. The file itself may not exist if this project's own jar does not expose Spring Boot configuration metadata, in which case this task does nothing.It is declared as
Internalrather than@InputFile, since Gradle's input validation requires an@InputFileto exist whenever its property has a value, even if marked@Optional; this task is alreadyDisableCachingByDefaultand never eligible for up-to-date checks, so nothing is lost by not tracking it as a cacheable input.- Returns:
- the artifact metadata file location, never null.
-
getRegistryName
The name of the registry this task publishes to.- Returns:
- the registry name, never null.
-
getRegistryConfigured
Whether the registry named bygetRegistryName()is fully configured (aurland eitherclientCredentials { }ortokenExchange { }grant). See theonlyIfpredicate this task is registered with inKonfigyrPlugin.- Returns:
- true if this task should run.
-
getReleaseTimeout
The maximum time in milliseconds to wait for a successful poll of a release.- Returns:
- the release timeout, never null.
- See Also:
-
getReleasePollingInterval
@Input public abstract org.gradle.api.provider.Property<@NonNull Duration> getReleasePollingInterval()The initial time interval in milliseconds between consecutive polling attempts to check for a release.- Returns:
- the release polling interval, never null.
- See Also:
-