|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Configuration
A Configuration
represents a group of artifacts and their dependencies.
See also examples on managing configurations in ConfigurationContainer
Nested Class Summary | |
---|---|
static class |
Configuration.Namer
A Namer namer for configurations that returns getName() . |
static class |
Configuration.State
The states a configuration can be into. |
Nested classes/interfaces inherited from interface org.gradle.api.file.FileCollection |
---|
FileCollection.AntType |
Method Summary | ||
---|---|---|
Configuration |
addArtifact(PublishArtifact artifact)
Deprecated. Use Collection.add(Object) on getArtifacts() instead. |
|
void |
addDependency(Dependency dependency)
Deprecated. Use Collection.add(Object) on getDependencies() instead. |
|
Configuration |
copy()
Creates a copy of this configuration that only contains the dependencies directly in this configuration (without contributions from superconfigurations). |
|
Configuration |
copy(Closure dependencySpec)
Takes a closure which gets coerced into a Spec. |
|
Configuration |
copy(Spec<? super Dependency> dependencySpec)
Creates a copy of this configuration ignoring superconfigurations (see copy() but filtering
the dependencies using the specified dependency spec. |
|
Configuration |
copyRecursive()
Creates a copy of this configuration that contains the dependencies directly in this configuration and those derived from superconfigurations. |
|
Configuration |
copyRecursive(Closure dependencySpec)
Takes a closure which gets coerced into a Spec. |
|
Configuration |
copyRecursive(Spec<? super Dependency> dependencySpec)
Creates a copy of this configuration with dependencies from superconfigurations (see copyRecursive() )
but filtering the dependencies using the dependencySpec. |
|
Configuration |
exclude(Map<String,String> 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(Closure dependencySpecClosure)
Takes a closure which gets coerced into a Spec. |
|
FileCollection |
fileCollection(Dependency... dependencies)
Resolves this configuration lazily. |
|
FileCollection |
fileCollection(Spec<? super Dependency> dependencySpec)
Resolves this configuration lazily. |
|
Set<File> |
files(Closure dependencySpecClosure)
Takes a closure which gets coerced into a Spec. |
|
Set<File> |
files(Dependency... dependencies)
Resolves this configuration. |
|
Set<File> |
files(Spec<? super Dependency> dependencySpec)
Resolves this configuration. |
|
Set<Configuration> |
getAll()
Returns all the configurations belonging to the same configuration container as this configuration (including this configuration). |
|
FileCollection |
getAllArtifactFiles()
Deprecated. Use PublishArtifactSet.getFiles() on getAllArtifacts() instead. |
|
PublishArtifactSet |
getAllArtifacts()
Returns the artifacts of this configuration including the artifacts of extended configurations. |
|
DependencySet |
getAllDependencies()
Gets the complete set of dependencies including those contributed by superconfigurations. |
|
|
getAllDependencies(Class<T> type)
Deprecated. Use DomainObjectSet.withType(Class) on getAllDependencies() instead. |
|
PublishArtifactSet |
getArtifacts()
Returns the artifacts of this configuration excluding the artifacts of extended configurations. |
|
TaskDependency |
getBuildArtifacts()
Deprecated. Use Buildable.getBuildDependencies() on getAllArtifacts() instead. |
|
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). |
|
|
getDependencies(Class<T> type)
Deprecated. Use DomainObjectSet.withType(Class) on getDependencies() instead. |
|
String |
getDescription()
Returns the description for this configuration. |
|
Set<ExcludeRule> |
getExcludeRules()
Returns the exclude rules applied for resolving any dependency of this configuration. |
|
Set<Configuration> |
getExtendsFrom()
Returns the names of the configurations which this configuration extends from. |
|
Set<Configuration> |
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()
Returns the state of the configuration. |
|
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 |
removeArtifact(PublishArtifact artifact)
Deprecated. Use Collection.remove(Object) on getArtifacts() instead. |
|
Configuration |
resolutionStrategy(Closure closure)
The resolution strategy provides extra details on how to resolve this configuration. |
|
Set<File> |
resolve()
Resolves this configuration. |
|
Configuration |
setDescription(String description)
Sets the description for this configuration. |
|
Configuration |
setExtendsFrom(Set<Configuration> 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 org.gradle.api.file.FileCollection |
---|
add, addToAntBuilder, addToAntBuilder, asType, contains, filter, filter, getAsFileTree, getAsPath, getFiles, getSingleFile, isEmpty, minus, plus, stopExecutionIfEmpty |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
ResolutionStrategy getResolutionStrategy()
ResolutionStrategy
for more info and examples.
Configuration resolutionStrategy(Closure closure)
ResolutionStrategy
for more info and examples.
closure
- closure applied to the ResolutionStrategy
Configuration.State getState()
Configuration.State
String getName()
boolean isVisible()
Configuration setVisible(boolean visible)
visible
- true if this is a visible configuration
Set<Configuration> getExtendsFrom()
Configuration setExtendsFrom(Set<Configuration> superConfigs)
superConfigs
- The super configuration. Should not be null.
Configuration extendsFrom(Configuration... superConfigs)
superConfigs
- The super configurations.
boolean isTransitive()
Configuration setTransitive(boolean t)
t
- true if this is a transitive configuration.
String getDescription()
Configuration setDescription(String description)
description
- the description. May be null
Set<Configuration> getHierarchy()
Set<File> resolve()
Set<File> files(Closure dependencySpecClosure)
files(org.gradle.api.specs.Spec)
.
dependencySpecClosure
- The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
Set<File> files(Spec<? super Dependency> dependencySpec)
dependencySpec
- The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
Set<File> files(Dependency... dependencies)
dependencies
- The dependences to be resolved
FileCollection fileCollection(Spec<? super Dependency> dependencySpec)
dependencySpec
- The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
FileCollection fileCollection(Closure dependencySpecClosure)
fileCollection(org.gradle.api.specs.Spec)
.
dependencySpecClosure
- The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
FileCollection fileCollection(Dependency... dependencies)
dependencies
- The dependencies for which the FileCollection should contain the files.
ResolvedConfiguration getResolvedConfiguration()
String getUploadTaskName()
Upload
TaskDependency getBuildDependencies()
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.
getBuildDependencies
in interface Buildable
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
@Deprecated TaskDependency getBuildArtifacts()
Buildable.getBuildDependencies()
on getAllArtifacts()
instead.
TaskDependency
object containing all required tasks to build the artifacts
belonging to this configuration or to one of its super configurations.
DependencySet getDependencies()
DependencySet getAllDependencies()
Gets the complete set of dependencies including those contributed by superconfigurations.
@Deprecated <T extends Dependency> DomainObjectSet<T> getDependencies(Class<T> type)
DomainObjectSet.withType(Class)
on getDependencies()
instead.
Gets the set of dependencies of type T directly contained in this configuration (ignoring superconfigurations).
The returned set is live, in that any future dependencies added to this configuration that match the type will appear in the returned set.
T
- the dependency typetype
- the dependency type
@Deprecated <T extends Dependency> DomainObjectSet<T> getAllDependencies(Class<T> type)
DomainObjectSet.withType(Class)
on getAllDependencies()
instead.
The returned set is live, in that any future dependencies added to this configuration that match the type will appear in the returned set.
T
- the dependency typetype
- the dependency type
@Deprecated void addDependency(Dependency dependency)
Collection.add(Object)
on getDependencies()
instead.
dependency
- The dependency to be added.PublishArtifactSet getArtifacts()
PublishArtifactSet getAllArtifacts()
@Deprecated FileCollection getAllArtifactFiles()
PublishArtifactSet.getFiles()
on getAllArtifacts()
instead.
FileCollection
, including artifacts of extended
configurations.
Set<ExcludeRule> getExcludeRules()
exclude(java.util.Map)
Configuration exclude(Map<String,String> excludeProperties)
ModuleDependency.exclude(java.util.Map)
.
excludeProperties
- the properties to define the exclude rule.
Set<Configuration> getAll()
@Deprecated Configuration addArtifact(PublishArtifact artifact)
Collection.add(Object)
on getArtifacts()
instead.
artifact
- The artifact.
@Deprecated Configuration removeArtifact(PublishArtifact artifact)
Collection.remove(Object)
on getArtifacts()
instead.
artifact
- The artifact.
ResolvableDependencies getIncoming()
Configuration copy()
getHierarchy()
for the copy will not include any superconfigurations.
Configuration copyRecursive()
getHierarchy()
for the copy will not include any superconfigurations.
Configuration copy(Spec<? super Dependency> dependencySpec)
copy()
but filtering
the dependencies using the specified dependency spec.
dependencySpec
- filtering requirements
Configuration copyRecursive(Spec<? super Dependency> dependencySpec)
copyRecursive()
)
but filtering the dependencies using the dependencySpec.
dependencySpec
- filtering requirements
Configuration copy(Closure dependencySpec)
copy(org.gradle.api.specs.Spec)
dependencySpec
- filtering requirements
Configuration copyRecursive(Closure dependencySpec)
copyRecursive(org.gradle.api.specs.Spec)
dependencySpec
- filtering requirements
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |