Class TemplateSetResolver

java.lang.Object
com.arc_e_tect.gradle.trackerlens.lens.TemplateSetResolver

public class TemplateSetResolver extends Object
Resolves the full merged template set - this plugin's own bundled built-in template, plus every resolved external lensStyle pack's templates (optionally restricted to one preferred pack) - exactly the same way regardless of which task asks for it.

Deliberately has no trackerLens.template-equivalent parameter: a project's own one-off template file is a separate, pre-existing mechanism entirely outside lens-pack template discovery - see TemplateSource's own javadoc. Shared by GenerateTrackerLensTask (which looks up one selected id's content to render) and ListTrackerLensTemplatesTask (which only reports the set) - both call this one method rather than each re-implementing template-source assembly, so the two can never drift apart on what "the available templates" means. Mirrors LensSetResolver exactly; see that type's own javadoc for the full reasoning.

  • Constructor Details

    • TemplateSetResolver

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

    • resolve

      public List<ResolvedTemplate> resolve(Iterable<File> lensStyleClasspath, String preferredLensPack)
      Resolves the full merged template set.
      Parameters:
      lensStyleClasspath - classpath entries (directories or jars) resolved from the lensStyle configuration; a non-existent entry is skipped
      preferredLensPack - optional group:artifact coordinate restricting the external packs considered to the one whose derived label matches its artifact part; blank or null considers every pack
      Returns:
      the resolved, auto-namespaced template set