Package com.konfigyr.gradle
Class CreateServiceReleaseTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.konfigyr.gradle.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>
@DisableCachingByDefault(because="Performs a network call against a stateful remote service")
public abstract class CreateServiceReleaseTask
extends org.gradle.api.DefaultTask
Task that opens (or takes over) this service's current
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 is configured as
a service (a namespace and service are set), see the onlyIf predicate
this task is registered with in KonfigyrPlugin.
- Since:
- 1.1.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.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 Konfigyr namespace owning the service.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.
-
getNamespace
The Konfigyr namespace owning the service.- Returns:
- the namespace, never null.
-
getServiceName
The Konfigyr service name.- Returns:
- the service name, never null.
-