Class ResolveServiceDependenciesTask
- 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>
ArtifactMetadata for each of this project's resolved runtime
dependencies that expose Spring Boot configuration metadata, then writes the results to the
output directory.
This is the dependency-scanning half of the Service Release flow: the ArtifactMetadata
produced here, together with this project's own metadata from
GenerateArtifactMetadataTask, form the full candidate list
CreateServiceReleaseTask submits to open a service's release. This task is only ever
needed when the project is configured as a service (a namespace and service are
set) — otherwise it does not run.
Every project in the build is identified through getProjectArtifacts(), populated at
configuration time so this task never needs to access Project objects
during execution, keeping it compatible with the Gradle configuration cache.
Output files are named after the artifact coordinates, for example:
com.konfigyr-konfigyr-artifactory-1.0.0.json
- 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.provider.Property<org.gradle.api.artifacts.ArtifactCollection> Collection that contains transformed artifact metadata from theArtifactMetadataTransform.abstract org.gradle.api.file.DirectoryPropertyThe output directory where serializedArtifactMetadatafor each dependency should be written.abstract org.gradle.api.file.RegularFilePropertyThe manifest file that should be written that contains all the processed dependency artifacts.abstract org.gradle.api.provider.Property<String> The Konfigyr namespace owning the service.abstract org.gradle.api.provider.MapProperty<String, com.konfigyr.artifactory.Artifact> A map of every project in the build, keyed by Gradle project path, with each value being a pre-builtArtifactdescriptor.abstract org.gradle.api.file.ConfigurableFileCollectionThe collection of files that represent the runtime classpath of the current project.abstract org.gradle.api.provider.Property<ArtifactoryService> Returns theArtifactoryServiceto use for constructing and writing the artifact metadata.abstract org.gradle.api.provider.Property<String> The Konfigyr service name.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
-
ResolveServiceDependenciesTask
public ResolveServiceDependenciesTask()
-
-
Method Details
-
getService
Returns theArtifactoryServiceto use for constructing and writing the artifact metadata.- Returns:
- the artifactory service to use, never null.
-
getArtifacts
@Internal public abstract org.gradle.api.provider.Property<org.gradle.api.artifacts.ArtifactCollection> getArtifacts()Collection that contains transformed artifact metadata from theArtifactMetadataTransform.Each
ResolvedArtifactResultshould be associated with themetadata.jsonfile containing the serializedPropertyDescriptors.- Returns:
- the transformed artifact metadata, never null.
-
getRuntimeClasspath
@InputFiles @Classpath public abstract org.gradle.api.file.ConfigurableFileCollection getRuntimeClasspath()The collection of files that represent the runtime classpath of the current project. This is declared purely as a stable, cacheable proxy forgetArtifacts()— anArtifactCollectionis not itself a safe cache key.- Returns:
- the project's runtime classpath, never null.
-
getProjectArtifacts
@Input public abstract org.gradle.api.provider.MapProperty<String,com.konfigyr.artifactory.Artifact> getProjectArtifacts()A map of every project in the build, keyed by Gradle project path, with each value being a pre-builtArtifactdescriptor.The map is populated at configuration time so the task action never needs to access live
Projectobjects, keeping this task compatible with the Gradle configuration cache.- Returns:
- the project artifacts map, never null.
-
getNamespace
The Konfigyr namespace owning the service. Only used to gate whether this task should run at all — not otherwise consumed by the task action.- Returns:
- the namespace, never null.
-
getServiceName
The Konfigyr service name. Only used to gate whether this task should run at all — not otherwise consumed by the task action.- Returns:
- the service name, never null.
-
getDependencyManifest
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getDependencyManifest()The manifest file that should be written that contains all the processed dependency artifacts.- Returns:
- the output manifest file location, never null.
-
getDependencyDirectory
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getDependencyDirectory()The output directory where serializedArtifactMetadatafor each dependency should be written.- Returns:
- the output dependency artifact directory, never null.
-