|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
org.gradle.api.artifacts.Configuration org.gradle.api.tasks.AntBuilderAware org.gradle.api.file.FileCollection org.gradle.api.Buildable
@HasInternalProtocol public interface Configuration extends FileCollection
A Configuration represents a group of artifacts and their dependencies. Find more information about declaring dependencies to a configuration or about managing configurations in docs for ConfigurationContainer
Configuration is an instance of a FileCollection that contains all dependencies (see also getAllDependencies()) but not artifacts. If you want to refer to the artifacts declared in this configuration please use getArtifacts() or getAllArtifacts(). Read more about declaring artifacts in the configuration in docs for ArtifactHandler
Nested Class Summary | |
---|---|
static class |
Configuration.Namer
|
enum |
Configuration.State
The states a configuration can be into. |
Method Summary | |
---|---|
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(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(Closure dependencySpec)
Takes a closure which gets coerced into a Spec. |
Configuration
|
exclude(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(Closure dependencySpecClosure)
Takes a closure which gets coerced into a Spec. |
FileCollection
|
fileCollection(Dependency... dependencies)
Resolves this configuration lazily. |
Set
|
files(Closure dependencySpecClosure)
Takes a closure which gets coerced into a Spec. |
Set
|
files(Spec dependencySpec)
Resolves this configuration. |
Set
|
files(Dependency... dependencies)
Resolves this configuration. |
Set
|
getAll()
Returns all the configurations belonging to the same configuration container as this configuration (including this configuration). |
PublishArtifactSet
|
getAllArtifacts()
Returns the artifacts of this configuration including the artifacts of extended configurations. |
DependencySet
|
getAllDependencies()
|
PublishArtifactSet
|
getArtifacts()
Returns the artifacts of this configuration excluding the artifacts of extended configurations. |
TaskDependency
|
getBuildDependencies()
Returns a TaskDependency object containing all required dependencies to build the internal dependencies (e.g. |
DependencySet
|
getDependencies()
Gets the set of dependencies directly contained in this configuration (ignoring superconfigurations). |
String
|
getDescription()
Returns the description for this configuration. |
Set
|
getExcludeRules()
Returns the exclude rules applied for resolving any dependency of this configuration. |
Set
|
getExtendsFrom()
Returns the names of the configurations which this configuration extends from. |
Set
|
getHierarchy()
Gets a ordered set including this configuration and all superconfigurations recursively. |
ResolvableDependencies
|
getIncoming()
Returns the incoming dependencies of this configuration. |
String
|
getName()
Returns the name of this configuration. |
ResolutionStrategy
|
getResolutionStrategy()
Returns the resolution strategy used by this configuration. |
ResolvedConfiguration
|
getResolvedConfiguration()
Resolves this configuration. |
Configuration.State
|
getState()
A Configuration represents a group of artifacts and their dependencies. |
TaskDependency
|
getTaskDependencyFromProjectDependency(boolean useDependedOn, 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. |
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. |
Configuration
|
resolutionStrategy(Closure closure)
The resolution strategy provides extra details on how to resolve this configuration. |
Set
|
resolve()
Resolves this configuration. |
Configuration
|
setDescription(String description)
Sets the description for this configuration. |
Configuration
|
setExtendsFrom(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 AntBuilderAware | |
---|---|
addToAntBuilder |
Methods inherited from interface Iterable | |
---|---|
iterator |
Methods inherited from interface Buildable | |
---|---|
getBuildDependencies |
Method Detail |
---|
public Configuration copy()
public Configuration copy(Spec dependencySpec)
dependencySpec
- filtering requirements
public Configuration copy(Closure dependencySpec)
dependencySpec
- filtering requirements
public Configuration copyRecursive()
public Configuration copyRecursive(Spec dependencySpec)
dependencySpec
- filtering requirements
public Configuration copyRecursive(Closure dependencySpec)
dependencySpec
- filtering requirements
public Configuration exclude(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(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 Set files(Closure dependencySpecClosure)
dependencySpecClosure
- The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
public 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 Set files(Dependency... dependencies)
dependencies
- The dependences to be resolved
public Set getAll()
public PublishArtifactSet getAllArtifacts()
public DependencySet getAllDependencies()
Gets the complete set of dependencies including those contributed by superconfigurations.
public PublishArtifactSet getArtifacts()
public TaskDependency getBuildDependencies()
public DependencySet getDependencies()
public String getDescription()
public Set getExcludeRules()
public Set getExtendsFrom()
public Set getHierarchy()
public ResolvableDependencies getIncoming()
public String getName()
public ResolutionStrategy getResolutionStrategy()
public ResolvedConfiguration getResolvedConfiguration()
public Configuration.State getState()
Configuration is an instance of a FileCollection that contains all dependencies (see also getAllDependencies()) but not artifacts. If you want to refer to the artifacts declared in this configuration please use getArtifacts() or getAllArtifacts(). Read more about declaring artifacts in the configuration in docs for ArtifactHandler
public TaskDependency getTaskDependencyFromProjectDependency(boolean useDependedOn, 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 String getUploadTaskName()
public boolean isTransitive()
public boolean isVisible()
public Configuration resolutionStrategy(Closure closure)
closure
- closure applied to the ResolutionStrategy
public Set resolve()
public Configuration setDescription(String description)
description
- the description. May be null
public Configuration setExtendsFrom(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
Gradle API 1.12