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 -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate()Generates the dashboard: reads every registered tracker, resolves lenses, writes the output, and validates it againstContractRule.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.ConfigurableFileCollectionClasspath entries (directories or jars) resolved from thelensStyleconfiguration.abstract org.gradle.api.file.RegularFilePropertyOptional single CSS file contributing thecustom-lenslens.abstract org.gradle.api.file.DirectoryPropertyWheredashboard.htmland 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.RegularFilePropertyOptional user-supplied Mustache template overriding this plugin's own bundled default fordashboard.html's static structure and wording.abstract org.gradle.api.provider.ListProperty<TrackerSpec> The resolved tracker registrations to read, as captured from thetrackerLensDSL.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, 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
-
GenerateTrackerLensTask
@Inject public GenerateTrackerLensTask()Creates a new task instance. Instantiated by Gradle infrastructure.
-
-
Method Details
-
getTrackerSpecs
The resolved tracker registrations to read, as captured from thetrackerLensDSL.- 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 thelensStyleconfiguration.- 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 thecustom-lenslens.- Returns:
- mutable file property for the custom lens stylesheet
-
getPreferredLensPack
Optional coordinate restricting which single external style pack's lenses are offered.- Returns:
- mutable property for the preferred lens pack coordinate
-
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()Wheredashboard.htmland 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 fordashboard.html's static structure and wording.- Returns:
- mutable file property for the custom dashboard template
-
getDashboardName
The dashboard's displayed name, shown in the browser tab title and the page heading. Always present by the time this task runs -TrackerLensExtensiongives 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
Version shown alongside the dashboard's name. Always present by the time this task runs -TrackerLensExtensiongives it aproject.versionconvention, 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 againstContractRule.
-