public class ProjectDelegate
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
org.savantbuild.output.Output |
output |
Project |
project |
Constructor and Description |
---|
ProjectDelegate(org.savantbuild.output.Output output,
Project project) |
Modifier and Type | Method and Description |
---|---|
org.savantbuild.dep.domain.Dependencies |
dependencies(groovy.lang.Closure closure)
Configures the project dependencies.
|
Publications |
publications(groovy.lang.Closure closure)
Configures the project publications.
|
org.savantbuild.dep.workflow.Workflow |
publishWorkflow(groovy.lang.Closure closure)
Configures the project publish workflow.
|
org.savantbuild.dep.workflow.Workflow |
workflow(groovy.lang.Closure closure)
Configures the project workflow.
|
public final org.savantbuild.output.Output output
public final Project project
public ProjectDelegate(org.savantbuild.output.Output output, Project project)
public org.savantbuild.dep.domain.Dependencies dependencies(@DelegatesTo(value=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") } }
closure
- The closure that is called to setup the Dependencies configuration. This closure uses the delegate
class DependenciesDelegate
.public Publications publications(@DelegatesTo(value=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 { 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") }
closure
- The closure that is called to setup the publications. This closure uses the delegate class PublicationsDelegate
.public org.savantbuild.dep.workflow.Workflow publishWorkflow(@DelegatesTo(value=WorkflowDelegate.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/") }
closure
- The closure that is called to setup the publish workflow configuration. This closure uses the
delegate class WorkflowDelegate.ProcessDelegate
.public org.savantbuild.dep.workflow.Workflow workflow(@DelegatesTo(value=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: "http://repository.savantbuild.org") } publish { cache() } }
closure
- The closure that is called to setup the workflow configuration. This closure uses the delegate class
WorkflowDelegate
.