Package org.savantbuild.parser.groovy
Class ProjectDelegate
java.lang.Object
org.savantbuild.parser.groovy.ProjectDelegate
Groovy delegate that captures the Project configuration from the project build file. The methods on this class
capture the configuration from the DSL.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.savantbuild.dep.domain.Dependenciesdependencies(groovy.lang.Closure<?> closure) Configures the project dependencies.publications(groovy.lang.Closure<?> closure) Configures the project publications.org.savantbuild.dep.workflow.WorkflowpublishWorkflow(groovy.lang.Closure<?> closure) Configures the project publish workflow.org.savantbuild.dep.workflow.Workflowworkflow(groovy.lang.Closure<?> closure) Configures the project workflow.
-
Field Details
-
output
public final org.savantbuild.output.Output output -
project
-
-
Constructor Details
-
ProjectDelegate
-
-
Method Details
-
dependencies
public org.savantbuild.dep.domain.Dependencies dependencies(@DelegatesTo(DependenciesDelegate.class) groovy.lang.Closure<?> closure) Configures the project dependencies. This method is called with a closure that contains the dependencies definition. It should look like:
dependencies { group(name: "compile") { dependency("org.example:compile:1.0") } group(name: "test-compile") { dependency("org.example:test:1.0") } }- Parameters:
closure- The closure that is called to setup the Dependencies configuration. This closure uses the delegate classDependenciesDelegate.- Returns:
- The Dependencies.
-
publications
public Publications publications(@DelegatesTo(PublicationsDelegate.class) groovy.lang.Closure<?> closure) Configures the project publications. This method is called with a closure that contains the publication definitions. It should look like:
publications { main { publication(name: "foo", file: "build/jars/foo-${project.version}.jar", source: "build/jars/foo-${project.version}-src.jar") publication(name: "foo-test", file: "build/jars/foo-test-${project.version}.jar", source: "build/jars/foo-test${project.version}-src.jar") } }- Parameters:
closure- The closure that is called to setup the publications. This closure uses the delegate classPublicationsDelegate.- Returns:
- The list of Publications.
-
publishWorkflow
public org.savantbuild.dep.workflow.Workflow publishWorkflow(@DelegatesTo(ProcessDelegate.class) groovy.lang.Closure<?> closure) Configures the project publish workflow. This method is called with a closure that contains the public workflow definition. It should look like:
publishWorkflow { subversion(repository: "http://svn.example.com/") }- Parameters:
closure- The closure that is called to setup the publish workflow configuration. This closure uses the delegate classWorkflowDelegate.ProcessDelegate.- Returns:
- The workflow.
-
workflow
public org.savantbuild.dep.workflow.Workflow workflow(@DelegatesTo(WorkflowDelegate.class) groovy.lang.Closure<?> closure) Configures the project workflow. This method is called with a closure that contains the workflow definition. It should look like:
workflow { fetch { cache() url(url: "https://repository.savantbuild.org") } publish { cache() } }- Parameters:
closure- The closure that is called to set up the workflow configuration. This closure uses the delegate classWorkflowDelegate.- Returns:
- The workflow.
-