use of org.gradle.internal.component.model.LocalComponentDependencyMetadata in project gradle by gradle.
the class ExternalModuleIvyDependencyDescriptorFactory method createDependencyDescriptor.
public DslOriginDependencyMetadata createDependencyDescriptor(String clientConfiguration, AttributeContainer clientAttributes, ModuleDependency dependency) {
ExternalModuleDependency externalModuleDependency = (ExternalModuleDependency) dependency;
boolean force = externalModuleDependency.isForce();
boolean changing = externalModuleDependency.isChanging();
boolean transitive = externalModuleDependency.isTransitive();
ModuleVersionSelector requested = new DefaultModuleVersionSelector(nullToEmpty(dependency.getGroup()), nullToEmpty(dependency.getName()), nullToEmpty(dependency.getVersion()));
ModuleComponentSelector selector = DefaultModuleComponentSelector.newSelector(requested);
List<Exclude> excludes = convertExcludeRules(clientConfiguration, dependency.getExcludeRules());
LocalComponentDependencyMetadata dependencyMetaData = new LocalComponentDependencyMetadata(selector, requested, clientConfiguration, clientAttributes, dependency.getTargetConfiguration(), convertArtifacts(dependency.getArtifacts()), excludes, force, changing, transitive);
return new DslOriginDependencyMetadataWrapper(dependencyMetaData, dependency);
}
use of org.gradle.internal.component.model.LocalComponentDependencyMetadata in project gradle by gradle.
the class ProjectIvyDependencyDescriptorFactory method createDependencyDescriptor.
public DslOriginDependencyMetadata createDependencyDescriptor(String clientConfiguration, AttributeContainer clientAttributes, ModuleDependency dependency) {
ProjectDependencyInternal projectDependency = (ProjectDependencyInternal) dependency;
projectDependency.beforeResolved();
Module module = getProjectModule(dependency);
ModuleVersionSelector requested = new DefaultModuleVersionSelector(module.getGroup(), module.getName(), module.getVersion());
ComponentSelector selector = DefaultProjectComponentSelector.newSelector(projectDependency.getDependencyProject());
List<Exclude> excludes = convertExcludeRules(clientConfiguration, dependency.getExcludeRules());
LocalComponentDependencyMetadata dependencyMetaData = new LocalComponentDependencyMetadata(selector, requested, clientConfiguration, clientAttributes, projectDependency.getTargetConfiguration(), convertArtifacts(dependency.getArtifacts()), excludes, false, false, dependency.isTransitive());
return new DslOriginDependencyMetadataWrapper(dependencyMetaData, dependency);
}
Aggregations