Class DependencyDelegate

java.lang.Object
org.savantbuild.parser.groovy.DependencyDelegate

public class DependencyDelegate extends Object
Groovy delegate that defines the dependencies.
  • Constructor Details

    • DependencyDelegate

      public DependencyDelegate(org.savantbuild.dep.domain.DependencyGroup group, Map<String,org.savantbuild.domain.Version> semanticVersionMappings)
  • Method Details

    • dependency

      public org.savantbuild.dep.domain.Artifact dependency(Map<String,Object> attributes)
      Defines a dependency without exclusion by calling dependency(Map, Closure) with null for the closure.
      Parameters:
      attributes - The attributes.
      Returns:
      The dependency object.
      See Also:
      • Artifact(String)
    • dependency

      public org.savantbuild.dep.domain.Artifact dependency(Map<String,Object> attributes, @DelegatesTo(ExclusionDelegate.class) groovy.lang.Closure<?> closure)
      Defines a dependency. This takes a Map of attributes but only the id attributes is required. This attribute defines the dependency (as a String). The optional attribute is optional and defines if the dependency is optional.
      Parameters:
      attributes - The attributes.
      closure - The exclusion delegate if one was provided.
      Returns:
      The dependency object.
      See Also:
      • Artifact(String)