Class GenerateTrackerLensTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.arc_e_tect.gradle.trackerlens.GenerateTrackerLensTask
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="Generates a dashboard from tracker history files and resolved style packs") public abstract class GenerateTrackerLensTask extends org.gradle.api.DefaultTask
Reads every registered tracker's NDJSON history, computes a completion Projection for each, resolves the merged lens set, writes dashboard.html plus one CSS file per discovered lens, and validates the result against ContractRule as its unconditional last step - a dashboard that silently can't take a lens because generation drifted from its own content contract is a worse failure than a build error.
  • 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
    Generates the dashboard: reads every registered tracker, resolves lenses, writes the output, and validates it against ContractRule.
    abstract org.gradle.api.provider.Property<String>
    The dashboard's displayed name, shown in the browser tab title and the page heading.
    abstract org.gradle.api.provider.Property<String>
    Optional lens id active on first load.
    abstract org.gradle.api.file.ConfigurableFileCollection
    Classpath entries (directories or jars) resolved from the lensStyle configuration.
    abstract org.gradle.api.file.RegularFileProperty
    Optional single CSS file contributing the custom-lens lens.
    abstract org.gradle.api.file.DirectoryProperty
    Where dashboard.html and its lens CSS files are written.
    abstract org.gradle.api.provider.Property<String>
    Optional coordinate restricting which single external style pack's lenses are offered.
    abstract org.gradle.api.file.RegularFileProperty
    Optional user-supplied Mustache template overriding this plugin's own bundled default for dashboard.html's static structure and wording.
    abstract org.gradle.api.provider.Property<String>
    Optional id of a lens-pack-provided template to render dashboard.html from, instead of this plugin's own bundled default.
    abstract org.gradle.api.provider.ListProperty<TrackerSpec>
    The resolved tracker registrations to read, as captured from the trackerLens DSL.
    abstract org.gradle.api.provider.Property<String>
    Version shown alongside the dashboard's 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, 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

    • GenerateTrackerLensTask

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

    • getTrackerSpecs

      @Internal public abstract org.gradle.api.provider.ListProperty<TrackerSpec> getTrackerSpecs()
      The resolved tracker registrations to read, as captured from the trackerLens DSL.
      Returns:
      mutable list property of resolved tracker registrations
    • getLensStyleClasspath

      @Classpath public abstract org.gradle.api.file.ConfigurableFileCollection getLensStyleClasspath()
      Classpath entries (directories or jars) resolved from the lensStyle configuration.
      Returns:
      mutable file collection of external style-pack classpath roots
    • getLensStylesheet

      @InputFile @PathSensitive(RELATIVE) @Optional public abstract org.gradle.api.file.RegularFileProperty getLensStylesheet()
      Optional single CSS file contributing the custom-lens lens.
      Returns:
      mutable file property for the custom lens stylesheet
    • getPreferredLensPack

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getPreferredLensPack()
      Optional coordinate restricting which single external style pack's lenses are offered.
      Returns:
      mutable property for the preferred lens pack coordinate
    • getDefaultLens

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getDefaultLens()
      Optional lens id active on first load.
      Returns:
      mutable property for the default lens id
    • getOutputDirectory

      @OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getOutputDirectory()
      Where dashboard.html and its lens CSS files are written.
      Returns:
      mutable directory property for the output directory
    • getTemplate

      @InputFile @PathSensitive(RELATIVE) @Optional public abstract org.gradle.api.file.RegularFileProperty getTemplate()
      Optional user-supplied Mustache template overriding this plugin's own bundled default for dashboard.html's static structure and wording.
      Returns:
      mutable file property for the custom dashboard template
    • getTemplateId

      @Input @Optional public abstract org.gradle.api.provider.Property<String> getTemplateId()
      Optional id of a lens-pack-provided template to render dashboard.html from, instead of this plugin's own bundled default. Mutually exclusive with getTemplate().
      Returns:
      mutable property for the selected lens-pack template's id
    • getDashboardName

      @Input public abstract org.gradle.api.provider.Property<String> getDashboardName()
      The dashboard's displayed name, shown in the browser tab title and the page heading. Always present by the time this task runs - TrackerLensExtension gives it a "<project.name> Lens" convention, so there is nothing for this property to fall back to on its own.
      Returns:
      mutable property for the dashboard's displayed name
    • getVersion

      @Input public abstract org.gradle.api.provider.Property<String> getVersion()
      Version shown alongside the dashboard's name. Always present by the time this task runs - TrackerLensExtension gives it a project.version convention, so there is nothing for this property to fall back to on its own.
      Returns:
      mutable property for the displayed version
    • generate

      public void generate()
      Generates the dashboard: reads every registered tracker, resolves lenses, writes the output, and validates it against ContractRule.