Class GenerateTrackerLensFixtureTask
- 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>
gherkin-progress-history.ndjson and
api-contract-progress.ndjson fixture files - a convenience wrapper around
TrackerLensFixtureGenerator for a lens-pack developer prototyping locally, exposing
FixtureSpec's fields as task properties, every one of them optional and defaulting
exactly as FixtureSpec.defaults() does.
Left entirely at its defaults, asOf defaults to the current instant at task-execution
time - not at configuration time - so re-running this task always regenerates a fixture fresh
relative to whenever it's run, exactly like FixtureSpec.defaults() does for a direct Java
caller. Instant.now() is invisible to Gradle's own input snapshotting - unlike a real
@Input property, an unset one is recorded identically on every execution - so without
@UntrackedTask a second, otherwise-unchanged invocation would report
UP-TO-DATE and silently skip regenerating, defeating the entire point of leaving
asOf at its default. @UntrackedTask disables both up-to-date checking and the
shared build cache for this task, matching what's actually true of it: every execution can
legitimately produce different output that no declared input/output tracking could represent.
-
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 TypeMethodDescriptionvoidgenerate()Builds aFixtureSpecfrom this task's properties and delegates toTrackerLensFixtureGenerator.abstract org.gradle.api.provider.Property<Integer> How many API-contract records to generate.abstract org.gradle.api.file.RegularFilePropertyWhere the generated API-contract history is written.abstract org.gradle.api.provider.Property<String> getAsOf()The instant to generate the fixture as of, as an ISO-8601 string (e.g.abstract org.gradle.api.provider.Property<Integer> How many BDD-scenario records to generate.abstract org.gradle.api.file.RegularFilePropertyWhere the generated BDD-scenario history is written.abstract org.gradle.api.provider.Property<Integer> How many calendar days out fromasOfthe calibrated forecast should land.abstract org.gradle.api.provider.Property<Integer> How many days of history, ending atasOf, the generated timestamps are spread across.abstract org.gradle.api.provider.Property<Integer> Must be left at 5 - seeFixtureSpec.workingDaysPerWeek().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
-
GenerateTrackerLensFixtureTask
@Inject public GenerateTrackerLensFixtureTask()Creates a new task instance. Instantiated by Gradle infrastructure.
-
-
Method Details
-
getAsOf
The instant to generate the fixture as of, as an ISO-8601 string (e.g.2026-08-16T00:00:00Z). Unset by default, resolving toInstant.now()at task-execution time.- Returns:
- mutable property for the
asOfinstant
-
getHistoryStartDaysAgo
How many days of history, ending atasOf, the generated timestamps are spread across. Defaults toFixtureSpec.defaults()'s value.- Returns:
- mutable property for
historyStartDaysAgo
-
getForecastTargetDaysOut
@Input @Optional public abstract org.gradle.api.provider.Property<Integer> getForecastTargetDaysOut()How many calendar days out fromasOfthe calibrated forecast should land. Defaults toFixtureSpec.defaults()'s value.- Returns:
- mutable property for
forecastTargetDaysOut
-
getWorkingDaysPerWeek
Must be left at 5 - seeFixtureSpec.workingDaysPerWeek().- Returns:
- mutable property for
workingDaysPerWeek
-
getBddScenarioCount
How many BDD-scenario records to generate. Defaults toFixtureSpec.defaults()'s value.- Returns:
- mutable property for
bddScenarioCount
-
getApiContractCount
How many API-contract records to generate. Defaults toFixtureSpec.defaults()'s value.- Returns:
- mutable property for
apiContractCount
-
getBddScenarioHistoryFile
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getBddScenarioHistoryFile()Where the generated BDD-scenario history is written.- Returns:
- mutable file property for the BDD-scenario history output file
-
getApiContractHistoryFile
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getApiContractHistoryFile()Where the generated API-contract history is written.- Returns:
- mutable file property for the API-contract history output file
-
generate
public void generate()Builds aFixtureSpecfrom this task's properties and delegates toTrackerLensFixtureGenerator.
-