Class TrackerRegistration
java.lang.Object
com.arc_e_tect.gradle.trackerlens.TrackerRegistration
One
trackerLens.trackers { register("...") { ... } } DSL registration: which history
file(s) to read and which TrackerSourceKind to read them with.
trackerLens {
trackers {
register("bdd-scenarios") {
historyFiles.from(file("gherkin-progress-history.ndjson"))
source = TrackerSourceKind.GHERKIN_SCENARIO
}
register("api-contracts") {
// One history file per detector plugin, or a directory containing them - either
// way, records sharing the same id across files are merged into one.
historyFiles.from(
file("shadow-api-detector-contract-history.ndjson"),
file("mirage-api-detector-contract-history.ndjson"),
file("doppelganger-api-detector-contract-history.ndjson"))
source = TrackerSourceKind.API_CONTRACT
}
}
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.file.ConfigurableFileCollectionThe NDJSON history file(s) to read.getName()This tracker's registered name.abstract org.gradle.api.provider.Property<TrackerSourceKind> Which built-inTrackerSourceto readgetHistoryFiles()with.
-
Constructor Details
-
TrackerRegistration
Creates a newTrackerRegistration. Instantiated by Gradle'sNamedDomainObjectContainerinfrastructure.- Parameters:
name- this tracker's registered name, becomesdata-trackerin the dashboard
-
-
Method Details
-
getName
This tracker's registered name.- Returns:
- the name
-
getHistoryFiles
public abstract org.gradle.api.file.ConfigurableFileCollection getHistoryFiles()The NDJSON history file(s) to read. Accepts one or more individual files and/or a directory containing them (every*.ndjsonfile directly within it, non-recursive) - useful when a tracker's history is split across several files, e.g. one contract history file per API-detector plugin instead of all three sharing one. Records sharing the same id across files are merged into a single item rather than rendered as duplicates.A configured entry that does not exist at task-run time is skipped with a warning, not a build failure - the producing plugin may not have run yet.
- Returns:
- mutable file collection for the history file(s)/directory
-
getSource
Which built-inTrackerSourceto readgetHistoryFiles()with.- Returns:
- mutable property for the tracker source kind
-