Class DependencySnapshotTask
- java.lang.Object
-
- org.gradle.api.internal.AbstractTask
-
- org.gradle.api.DefaultTask
-
- org.gradle.api.internal.ConventionTask
-
- org.gradle.api.tasks.SourceTask
-
- io.freefair.gradle.plugins.github.dependencies.DependencySnapshotTask
-
- All Implemented Interfaces:
Comparable<Task>
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.IConventionAware
,org.gradle.api.internal.TaskInternal
,Named
,ExtensionAware
,Task
,PatternFilterable
,Configurable<Task>
public abstract class DependencySnapshotTask extends SourceTask
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gradle.api.Task
Task.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 DependencySnapshotTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
buildSnapshot()
abstract Property<String>
getJobCorrelator()
Correlator provides a key that is used to group snapshots submitted over time.abstract Property<String>
getJobHtmlUrl()
The url for the job.abstract Property<String>
getJobId()
The external ID of the job.abstract RegularFileProperty
getOutputFile()
abstract Property<String>
getRef()
The repository branch that triggered this snapshot.abstract Property<String>
getSha()
The commit SHA associated with this dependency snapshot.FileTree
getSource()
-
Methods inherited from class org.gradle.api.tasks.SourceTask
exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSet, getPatternSetFactory, include, include, include, include, setExcludes, setIncludes, setSource, setSource, source
-
Methods inherited from class org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMapping
-
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, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, 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, getConvention, notCompatibleWithConfigurationCache
-
-
-
-
Method Detail
-
getOutputFile
@OutputFile public abstract RegularFileProperty getOutputFile()
-
getSha
@Input public abstract Property<String> getSha()
The commit SHA associated with this dependency snapshot. Maximum length: 40 characters.
-
getRef
@Input public abstract Property<String> getRef()
The repository branch that triggered this snapshot.- Returns:
- The repository branch that triggered this snapshot.
-
getJobId
@Input @Optional public abstract Property<String> getJobId()
The external ID of the job.- Returns:
- The external ID of the job.
-
getJobCorrelator
@Input public abstract Property<String> getJobCorrelator()
Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of job.correlator and detector.name will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation.
-
getJobHtmlUrl
@Input @Optional public abstract Property<String> getJobHtmlUrl()
The url for the job.- Returns:
- The url for the job.
-
getSource
@PathSensitive(NONE) public FileTree getSource()
- Overrides:
getSource
in classSourceTask
-
buildSnapshot
public void buildSnapshot() throws IOException
- Throws:
IOException
-
-