Dependency plugin.
Fields inherited from class | Fields |
---|---|
class org.savantbuild.plugin.groovy.BaseGroovyPlugin |
output, project, runtimeConfiguration |
Type | Name and description |
---|---|
org.savantbuild.dep.DependencyService |
dependencyService |
Constructor and description |
---|
DependencyPlugin
(org.savantbuild.domain.Project project, org.savantbuild.runtime.RuntimeConfiguration runtimeConfiguration, org.savantbuild.output.Output output) |
Type | Name and description |
---|---|
org.savantbuild.lang.Classpath |
classpath(groovy.lang.Closure closure) Builds a Classpath with Paths and dependencies. |
int |
copy(java.util.Map<java.lang.String, java.lang.Object> attributes, groovy.lang.Closure closure) Copies the project's dependencies to a directory. |
void |
integrate() Integrates the project (using the project's defined publications and workflow). |
java.util.Set<org.savantbuild.dep.domain.ResolvedArtifact> |
listUnusedDependencies(java.util.Map<java.lang.String, java.lang.Object> attributes = [:]) Determines which of the project's direct dependencies are not being used anymore. |
java.nio.file.Path |
path(java.util.Map<java.lang.String, java.lang.Object> attributes) Locates the location on disk of a single artifact. |
void |
printFull() Prints out the project dependencies to the output. |
org.savantbuild.dep.graph.ResolvedArtifactGraph |
resolve(groovy.lang.Closure closure) Uses the org.savantbuild.dep.DependencyService to resolve the project's dependencies. |
void |
writeLicenses(java.util.Map<java.lang.String, java.lang.Object> attributes) Writes out all of the project's licenses to the directory given in the [to] attribute. |
Methods inherited from class | Name |
---|---|
class org.savantbuild.plugin.groovy.BaseGroovyPlugin |
org.savantbuild.plugin.groovy.BaseGroovyPlugin#setProperty(java.lang.String, java.lang.Object), org.savantbuild.plugin.groovy.BaseGroovyPlugin#getProperty(java.lang.String), org.savantbuild.plugin.groovy.BaseGroovyPlugin#getMetaClass(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#setMetaClass(groovy.lang.MetaClass), org.savantbuild.plugin.groovy.BaseGroovyPlugin#invokeMethod(java.lang.String, java.lang.Object), org.savantbuild.plugin.groovy.BaseGroovyPlugin#wait(long, int), org.savantbuild.plugin.groovy.BaseGroovyPlugin#wait(long), org.savantbuild.plugin.groovy.BaseGroovyPlugin#wait(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#equals(java.lang.Object), org.savantbuild.plugin.groovy.BaseGroovyPlugin#toString(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#hashCode(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#getClass(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#notify(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#notifyAll() |
class groovy.lang.GroovyObjectSupport |
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll() |
Builds a Classpath with Paths and dependencies. This delegates to the ClasspathDelegate via the closure. Look at the methods on that class and its base classes to determine how to use the classpath closure.
Here is an example of calling this method:
Classpath classpath = dependency.classpath { dependencies(group: "compile", transitive: true, fetchSource: true, transitiveGroups: ["compile", "runtime"]) }
closure
- The closure.Copies the project's dependencies to a directory. This delegates to the CopyDelegate via the closure. The attributes must also contain a "to" directory. If the "to" directory doesn't exist, it is created by this method.
Here is an example of calling this method:
dependency.copy(to: "build/distributions/lib") { dependencies(group: "compile", transitive: true, fetchSource: true, transitiveGroups: ["compile", "runtime"]) }
attributes
- The named attributes (to is required).closure
- The closure.Integrates the project (using the project's defined publications and workflow). If there are no publications, this does nothing. Otherwise, it builds the integration version from the project's version and then publishes the publications using the project's workflow.
Here is an example of calling this method:
dependency.integrate()
Determines which of the project's direct dependencies are not being used anymore. This assumes that the groups are broken down like this:
Here is an example of calling this method:
dependency.listUnusedDependencies()
Locates the location on disk of a single artifact.
Here is an example of calling this method:
Path path = dependency.path(id: "org.apache.commons:commons-collection:3.1", group: "compile")
attributes
- The named attributes (id and group are required)Prints out the project dependencies to the output.
Uses the org.savantbuild.dep.DependencyService to resolve the project's dependencies. This invokes the Closure and delegates to a ResolveDelegate. This method returns the resulting org.savantbuild.dep.graph.ResolvedArtifactGraph.
Here is an example of calling this method:
ResolvedArtifactGraph graph = dependency.resolve { dependencies(group: "compile", transitive: true, fetchSource: true, transitiveGroups: ["compile", "runtime"]) }
closure
- The Closure.Writes out all of the project's licenses to the directory given in the [to] attribute. Here is an example of calling this method:
dependency.writeLicenses(to: "build/licenses")
attributes
- The named attributes (to is required).