Class TemplateScanner
java.lang.Object
com.arc_e_tect.gradle.trackerlens.lens.TemplateScanner
Scans one classpath root - a directory or a jar, this plugin's own bundled resources or a
resolved
lensStyle dependency, no distinction - for the fixed
META-INF/arc-e-tect/tracker-lens/templates/*.html convention and returns the
Templates it finds.
A lens pack is not just a color scheme - it can also ship one or more Mustache dashboard
templates, each a whole alternate view over the same tracking data, selectable via
trackerLens.templateId. This mirrors LensScanner exactly, one directory over from
lenses/; see that type's own javadoc for the reasoning behind every design choice here,
none of which differs for templates.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TemplateScanner
public TemplateScanner()Creates a newTemplateScanner.
-
-
Method Details
-
scan
ScansclasspathRootfor templates.- Parameters:
classpathRoot- a directory or a.jarfile; must exist- Returns:
- the templates found, in discovery order
- Throws:
org.gradle.api.GradleException- ifclasspathRootships two template files that resolve to the same lower-cased id
-