Class WorkflowDelegate

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

public class WorkflowDelegate extends Object
Groovy delegate that captures the Workflow configuration from the project build file. The methods on this class capture the configuration from the DSL.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Process delegate class that is used to configure Process instances for the FetchWorkflow and PublishWorkflow of the Workflow.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    final org.savantbuild.output.Output
     
    final org.savantbuild.dep.workflow.Workflow
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    WorkflowDelegate(org.savantbuild.output.Output output, org.savantbuild.dep.workflow.Workflow workflow)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fetch(groovy.lang.Closure<?> closure)
    Configures the fetch workflow processes.
    void
    publish(groovy.lang.Closure<?> closure)
    Configures the publish workflow processes.
    Map<String,org.savantbuild.domain.Version>
    semanticVersions(groovy.lang.Closure<?> closure)
    Configures the project's semantic version mappings.
    void
    Configures the standard project workflow as follows:

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • defaultMavenDir

      public static final String defaultMavenDir
    • output

      public final org.savantbuild.output.Output output
    • workflow

      public final org.savantbuild.dep.workflow.Workflow workflow
  • Constructor Details

    • WorkflowDelegate

      public WorkflowDelegate(org.savantbuild.output.Output output, org.savantbuild.dep.workflow.Workflow workflow)
  • Method Details

    • fetch

      public void fetch(@DelegatesTo(ProcessDelegate.class) groovy.lang.Closure<?> closure)
      Configures the fetch workflow processes.
      Parameters:
      closure - The closure. This closure uses the delegate class WorkflowDelegate.ProcessDelegate.
    • publish

      public void publish(@DelegatesTo(ProcessDelegate.class) groovy.lang.Closure<?> closure)
      Configures the publish workflow processes.
      Parameters:
      closure - The closure. This closure uses the delegate class WorkflowDelegate.ProcessDelegate.
    • semanticVersions

      public Map<String,org.savantbuild.domain.Version> semanticVersions(@DelegatesTo(SemanticVersionDelegate.class) groovy.lang.Closure<?> closure)

      Configures the project's semantic version mappings. This method is called with a closure that contains the mappings. It should look like:

         semanticVersions {
           mapping(id: "org.badver:badver:1.0.0.Final", version: "1.0.0")
         }
       
      Parameters:
      closure - The closure that is called to set up the semantic version mappings. This closure uses the delegate class SemanticVersionDelegate.
      Returns:
      The mappings.
    • standard

      public void standard()

      Configures the standard project workflow as follows:

         fetch {
           cache()
           url(url: "https://repository.savantbuild.org")
           maven(url: "https://repo1.maven.org/maven2")
         }
         publish {
           cache()
         }