use of org.gradle.api.internal.attributes.AttributeContainerInternal in project gradle by gradle.
the class DefaultDependenciesToModuleDescriptorConverter method addDependencies.
private void addDependencies(BuildableLocalComponentMetadata metaData, ConfigurationInternal configuration) {
AttributeContainerInternal attributes = configuration.getAttributes();
for (Dependency dependency : configuration.getDependencies()) {
if (dependency instanceof ModuleDependency) {
ModuleDependency moduleDependency = (ModuleDependency) dependency;
metaData.addDependency(dependencyDescriptorFactory.createDependencyDescriptor(configuration.getName(), attributes, moduleDependency));
} else if (dependency instanceof FileCollectionDependency) {
final FileCollectionDependency fileDependency = (FileCollectionDependency) dependency;
metaData.addFiles(configuration.getName(), new DefaultLocalFileDependencyMetadata(fileDependency));
} else {
throw new IllegalArgumentException("Cannot convert dependency " + dependency + " to local component dependency metadata.");
}
}
}
Aggregations