Class GenerateTrackerLensFixtureTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.arc_e_tect.gradle.trackerlens.fixture.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>

@DisableCachingByDefault(because="Left at its defaults, asOf resolves to Instant.now() at execution time, so this task is deliberately non-reproducible run to run") public abstract class GenerateTrackerLensFixtureTask extends org.gradle.api.DefaultTask
Generates a calibrated pair of 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. This is why the task is never cacheable: its very purpose, left at defaults, is to produce different output on every run.

  • 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
    Constructor
    Description
    Creates a new task instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Builds a FixtureSpec from this task's properties and delegates to TrackerLensFixtureGenerator.
    abstract org.gradle.api.provider.Property<Integer>
    How many API-contract records to generate.
    abstract org.gradle.api.file.RegularFileProperty
    Where the generated API-contract history is written.
    abstract org.gradle.api.provider.Property<String>
    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.RegularFileProperty
    Where the generated BDD-scenario history is written.
    abstract org.gradle.api.provider.Property<Integer>
    How many calendar days out from asOf the calibrated forecast should land.
    abstract org.gradle.api.provider.Property<Integer>
    How many days of history, ending at asOf, the generated timestamps are spread across.
    abstract org.gradle.api.provider.Property<Integer>
    Must be left at 5 - see FixtureSpec.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, usesService

    Methods 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, 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, notCompatibleWithConfigurationCache
  • Constructor Details

    • GenerateTrackerLensFixtureTask

      @Inject public GenerateTrackerLensFixtureTask()
      Creates a new task instance. Instantiated by Gradle infrastructure.
  • Method Details

    • getAsOf

      @Input @Optional public abstract org.gradle.api.provider.Property<String> 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 to Instant.now() at task-execution time.
      Returns:
      mutable property for the asOf instant
    • getHistoryStartDaysAgo

      @Input @Optional public abstract org.gradle.api.provider.Property<Integer> getHistoryStartDaysAgo()
      How many days of history, ending at asOf, the generated timestamps are spread across. Defaults to FixtureSpec.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 from asOf the calibrated forecast should land. Defaults to FixtureSpec.defaults()'s value.
      Returns:
      mutable property for forecastTargetDaysOut
    • getWorkingDaysPerWeek

      @Input @Optional public abstract org.gradle.api.provider.Property<Integer> getWorkingDaysPerWeek()
      Must be left at 5 - see FixtureSpec.workingDaysPerWeek().
      Returns:
      mutable property for workingDaysPerWeek
    • getBddScenarioCount

      @Input @Optional public abstract org.gradle.api.provider.Property<Integer> getBddScenarioCount()
      How many BDD-scenario records to generate. Defaults to FixtureSpec.defaults()'s value.
      Returns:
      mutable property for bddScenarioCount
    • getApiContractCount

      @Input @Optional public abstract org.gradle.api.provider.Property<Integer> getApiContractCount()
      How many API-contract records to generate. Defaults to FixtureSpec.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 a FixtureSpec from this task's properties and delegates to TrackerLensFixtureGenerator.