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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.file.RegularFileProperty
    The file containing this project's own serialized ArtifactMetadata, written by GenerateArtifactMetadataTask.
    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 the ArtifactoryService to 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, usesService

    Methods 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, 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, notCompatibleWithConfigurationCache
  • Constructor Details

    • PublishArtifactMetadataTask

      public PublishArtifactMetadataTask()
  • Method Details

    • getService

      @Internal public abstract org.gradle.api.provider.Property<ArtifactoryService> getService()
      Returns the ArtifactoryService to 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 serialized ArtifactMetadata, written by GenerateArtifactMetadataTask. 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 Internal rather than @InputFile, since Gradle's input validation requires an @InputFile to exist whenever its property has a value, even if marked @Optional; this task is already DisableCachingByDefault and 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.
    • getReleaseTimeout

      @Input public abstract org.gradle.api.provider.Property<@NonNull Duration> 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: