|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
org.gradle.api.file.FileCollectionorg.gradle.api.Buildable
org.gradle.api.artifacts.Configuration
org.gradle.api.tasks.AntBuilderAware
public interface Configuration extends FileCollection
A Configuration represents a group of artifacts and their dependencies.
Nested Class Summary | |
---|---|
enum |
Configuration.State
The states a configuration can be into. |
Method Summary | |
---|---|
Configuration
|
addArtifact(PublishArtifact artifact)
Adds an artifact to be published to this configuration. |
void
|
addDependency(Dependency dependency)
Adds a dependency to this configuration. |
Configuration
|
copy()
Creates a copy of this configuration that only contains the dependencies directly in this configuration (without contributions from superconfigurations). |
Configuration
|
copy(Spec dependencySpec)
Creates a copy of this configuration ignoring superconfigurations (see copy() but filtering the dependencies using the specified dependency spec. |
Configuration
|
copy(groovy.lang.Closure dependencySpec)
Takes a closure which gets coerced into a Spec. |
Configuration
|
copyRecursive()
Creates a copy of this configuration that contains the dependencies directly in this configuration and those derived from superconfigurations. |
Configuration
|
copyRecursive(Spec dependencySpec)
Creates a copy of this configuration with dependencies from superconfigurations (see copyRecursive()) but filtering the dependencies using the dependencySpec. |
Configuration
|
copyRecursive(groovy.lang.Closure dependencySpec)
Takes a closure which gets coerced into a Spec. |
Configuration
|
exclude(java.util.Map excludeProperties)
Adds an exclude rule to exclude transitive dependencies for all dependencies of this configuration. |
Configuration
|
extendsFrom(Configuration superConfigs)
Adds the given configurations to the set of configuration which this configuration extends from. |
FileCollection
|
fileCollection(Spec dependencySpec)
Resolves this configuration lazily. |
FileCollection
|
fileCollection(groovy.lang.Closure dependencySpecClosure)
Takes a closure which gets coerced into a Spec. |
FileCollection
|
fileCollection(Dependency dependencies)
Resolves this configuration lazily. |
java.util.Set
|
files(groovy.lang.Closure dependencySpecClosure)
Takes a closure which gets coerced into a Spec. |
java.util.Set
|
files(Spec dependencySpec)
Resolves this configuration. |
java.util.Set
|
files(Dependency dependencies)
Resolves this configuration. |
java.util.Set
|
getAll()
Returns all the configurations belonging to the same configuration container as this configuration (including this configuration). |
FileCollection
|
getAllArtifactFiles()
Returns the artifacts of this configuration as a FileCollection, including artifacts of extended configurations. |
java.util.Set
|
getAllArtifacts()
Returns the artifacts of this configuration including the artifacts of extended configurations. |
java.util.Set
|
getAllDependencies()
Gets the complete set of dependencies including those contributed by superconfigurations. |
java.util.Set
|
getAllDependencies(java.lang.Class type)
Gets the set of dependencies of type T for this configuration including those contributed by superconfigurations. |
java.util.Set
|
getArtifacts()
Returns the artifacts of this configuration excluding the artifacts of extended configurations. |
TaskDependency
|
getBuildArtifacts()
Returns a TaskDependency object containing all required dependencies to build the artifacts belonging to this configuration or to one of its super configurations. |
TaskDependency
|
getBuildDependencies()
Returns a TaskDependency object containing all required dependencies to build the internal dependencies (e.g. project dependencies) belonging to this configuration or to one of its super configurations. |
java.util.Set
|
getDependencies()
Gets the set of dependencies directly contained in this configuration (ignoring superconfigurations). |
java.util.Set
|
getDependencies(java.lang.Class type)
Gets the set of dependencies of type T directly contained in this configuration (ignoring superconfigurations). |
java.lang.String
|
getDescription()
Returns the description for this configuration. |
java.util.Set
|
getExcludeRules()
Returns the exclude rules applied for resolving any dependency of this configuration. |
java.util.Set
|
getExtendsFrom()
Returns the names of the configurations which this configuration extends from. |
java.util.Set
|
getHierarchy()
Gets a ordered set including this configuration and all superconfigurations recursively. |
java.lang.String
|
getName()
Returns the name of this configuration. |
ResolvedConfiguration
|
getResolvedConfiguration()
Resolves this configuration. |
Configuration.State
|
getState()
A Configuration represents a group of artifacts and their dependencies. |
TaskDependency
|
getTaskDependencyFromProjectDependency(boolean useDependedOn, java.lang.String taskName)
Returns a TaskDependency object containing dependencies on all tasks with the specified name from project dependencies related to this configuration or one of its super configurations. |
java.lang.String
|
getUploadTaskName()
Returns the name of the task that upload the artifacts of this configuration to repositories declared by the user. |
boolean
|
isTransitive()
Returns the transitivity of this configuration. |
boolean
|
isVisible()
Returns true if this is a visible configuration. |
void
|
publish(java.util.List publishRepositories, java.io.File descriptorDestination)
Publishes the artifacts of this configuration to the specified repositories. |
Configuration
|
removeArtifact(PublishArtifact artifact)
Removes an artifact from the artifacts to be published to this configuration. |
java.util.Set
|
resolve()
Resolves this configuration. |
Configuration
|
setDescription(java.lang.String description)
Sets the description for this configuration. |
Configuration
|
setExtendsFrom(java.util.Set superConfigs)
Sets the configurations which this configuration extends from. |
Configuration
|
setTransitive(boolean t)
Sets the transitivity of this configuration. |
Configuration
|
setVisible(boolean visible)
Sets the visibility of this configuration. |
Methods inherited from interface FileCollection | |
---|---|
add, addToAntBuilder, addToAntBuilder, asType, contains, filter, filter, getAsFileTree, getAsPath, getFiles, getSingleFile, isEmpty, minus, plus, stopExecutionIfEmpty |
Methods inherited from interface java.lang.Iterable | |
---|---|
java.lang.Iterable#iterator() |
Methods inherited from interface Buildable | |
---|---|
getBuildDependencies |
Methods inherited from interface AntBuilderAware | |
---|---|
addToAntBuilder |
Method Detail |
---|
public Configuration addArtifact(PublishArtifact artifact)
artifact
- The artifact.
public void addDependency(Dependency dependency)
dependency
- The dependency to be added.
public Configuration copy()
public Configuration copy(Spec dependencySpec)
dependencySpec
- filtering requirements
public Configuration copy(groovy.lang.Closure dependencySpec)
dependencySpec
- filtering requirements
public Configuration copyRecursive()
public Configuration copyRecursive(Spec dependencySpec)
dependencySpec
- filtering requirements
public Configuration copyRecursive(groovy.lang.Closure dependencySpec)
dependencySpec
- filtering requirements
public Configuration exclude(java.util.Map excludeProperties)
excludeProperties
- the properties to define the exclude rule.
public Configuration extendsFrom(Configuration superConfigs)
superConfigs
- The super configurations.
public FileCollection fileCollection(Spec dependencySpec)
dependencySpec
- The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
public FileCollection fileCollection(groovy.lang.Closure dependencySpecClosure)
dependencySpecClosure
- The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
public FileCollection fileCollection(Dependency dependencies)
dependencies
- The dependencies for which the FileCollection should contain the files.
public java.util.Set files(groovy.lang.Closure dependencySpecClosure)
dependencySpecClosure
- The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
public java.util.Set files(Spec dependencySpec)
dependencySpec
- The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
public java.util.Set files(Dependency dependencies)
dependencies
- The dependences to be resolved
public java.util.Set getAll()
public FileCollection getAllArtifactFiles()
public java.util.Set getAllArtifacts()
public java.util.Set getAllDependencies()
public java.util.Set getAllDependencies(java.lang.Class type)
type
- the dependency type
- the dependency type
public java.util.Set getArtifacts()
public TaskDependency getBuildArtifacts()
public TaskDependency getBuildDependencies()
public java.util.Set getDependencies()
public java.util.Set getDependencies(java.lang.Class type)
type
- the dependency type
- the dependency type
public java.lang.String getDescription()
public java.util.Set getExcludeRules()
public java.util.Set getExtendsFrom()
public java.util.Set getHierarchy()
public java.lang.String getName()
public ResolvedConfiguration getResolvedConfiguration()
public Configuration.State getState()
A Configuration represents a group of artifacts and their dependencies.
public TaskDependency getTaskDependencyFromProjectDependency(boolean useDependedOn, java.lang.String taskName)
useDependedOn
- if true, add tasks from project dependencies in this configuration, otherwise use projects
from configurations with the same name that depend on this one.taskName
- name of task to depend on
public java.lang.String getUploadTaskName()
public boolean isTransitive()
public boolean isVisible()
public void publish(java.util.List publishRepositories, java.io.File descriptorDestination)
publishRepositories
- The repositories to publish the artifacts to.descriptorDestination
- The destination dir for the descriptor file (if null no descriptor file is written).
public Configuration removeArtifact(PublishArtifact artifact)
artifact
- The artifact.
public java.util.Set resolve()
public Configuration setDescription(java.lang.String description)
description
- the description. May be null
public Configuration setExtendsFrom(java.util.Set superConfigs)
superConfigs
- The super configuration. Should not be null.
public Configuration setTransitive(boolean t)
t
- true if this is a transitive configuration.
public Configuration setVisible(boolean visible)
visible
- true if this is a visible configuration
Groovy Documentation