Class CreateServiceReleaseTask
- 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>
ServiceRelease, uploads metadata
for every candidate artifact the server reports as ArtifactUploadStatus.UPLOAD_REQUIRED,
then completes the release so it becomes the service's current Manifest.
The candidate list submitted to the release is this project's own artifact metadata (from
GenerateArtifactMetadataTask, if it produces any) together with every dependency scanned
by ResolveServiceDependenciesTask.
This task only runs when the project has opted into the service-release scenario via Konfigyr
service DSL configuration. The namespace owning the service is resolved server-side from
the registry's authenticated access token, never asserted here.
- Since:
- 1.1.0
- See Also:
-
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.DirectoryPropertyThe directory where serialized dependencyArtifactMetadatais located, written byResolveServiceDependenciesTask.abstract org.gradle.api.file.RegularFilePropertyThe manifest file containing the dependency artifact metadata file locations, written byResolveServiceDependenciesTask.abstract org.gradle.api.provider.Property<@NonNull String> The name of the registry this task opens the service release against.abstract org.gradle.api.provider.Property<Boolean> Whether this task is eligible to run: the project'skonfigyr { service { } }block has been configured, and the registry named bygetRegistryName()is fully configured (aurland eitherclientCredentials { }ortokenExchange { }grant).abstract org.gradle.api.provider.Property<ArtifactoryService> Returns theArtifactoryServiceto use for creating the service release.abstract org.gradle.api.file.RegularFilePropertyThe file containing this project's own serializedArtifactMetadata, written byGenerateArtifactMetadataTask.abstract org.gradle.api.provider.Property<@NonNull String> The Konfigyr service name.abstract org.gradle.workers.WorkerExecutorTheWorkerExecutorto use for executing theServiceReleaseArtifactUploadActionfor every artifact the release reports as requiring an upload.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
-
CreateServiceReleaseTask
public CreateServiceReleaseTask()
-
-
Method Details
-
getService
Returns theArtifactoryServiceto use for creating the service release.- Returns:
- the artifactory service to use, never null.
-
getWorkerExecutor
@Inject public abstract org.gradle.workers.WorkerExecutor getWorkerExecutor()TheWorkerExecutorto use for executing theServiceReleaseArtifactUploadActionfor every artifact the release reports as requiring an upload.- Returns:
- the worker task executor, never null.
-
getServiceArtifactMetadata
@Internal public abstract org.gradle.api.file.RegularFileProperty getServiceArtifactMetadata()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 it is not part of the candidate list.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.
-
getDependencyManifest
@InputFile @PathSensitive(RELATIVE) public abstract org.gradle.api.file.RegularFileProperty getDependencyManifest()The manifest file containing the dependency artifact metadata file locations, written byResolveServiceDependenciesTask.- Returns:
- the dependency artifact manifest file location, never null.
-
getDependencyDirectory
@InputDirectory @PathSensitive(RELATIVE) public abstract org.gradle.api.file.DirectoryProperty getDependencyDirectory()The directory where serialized dependencyArtifactMetadatais located, written byResolveServiceDependenciesTask.- Returns:
- the dependency metadata directory, never null.
-
getRegistryName
The name of the registry this task opens the service release against.- Returns:
- the registry name, never null.
-
getServiceName
The Konfigyr service name. Must match the identifier this service already has in the Konfigyr app; there is no default, it must always be set explicitly viakonfigyr { service { name = ... } }.- Returns:
- the service name, never null.
-
getReleaseConfigured
Whether this task is eligible to run: the project'skonfigyr { service { } }block has been configured, and 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.
-