Class HistoryFileResolver

java.lang.Object
com.arc_e_tect.gradle.trackerlens.tracker.HistoryFileResolver

public class HistoryFileResolver extends Object
Expands a tracker's configured historyFiles entries into a flat, deterministic list of concrete NDJSON files to read: an entry that is itself a file is used as-is, and an entry that is a directory is expanded to every *.ndjson file directly within it (non-recursive), sorted by name.

This is what lets trackerLens.trackers.register("...") { historyFiles.from(...) } accept either individual files or a directory of them - useful when a tracker's history is split across several files, e.g. one contract history file per API-detector plugin.

  • Constructor Details

    • HistoryFileResolver

      public HistoryFileResolver()
      Creates a new HistoryFileResolver.
  • Method Details

    • resolve

      public List<File> resolve(Collection<File> configuredEntries)
      Expands configuredEntries into concrete files.
      Parameters:
      configuredEntries - the tracker's configured historyFiles entries; an entry need not exist
      Returns:
      the concrete files to read, directories expanded in place; an entry that doesn't exist is passed through unchanged (the caller is responsible for skipping it)