ProjectDependencyInternal projectDependency = (ProjectDependencyInternal) dependency;
projectDependency.beforeResolved();
ModuleRevisionId moduleRevisionId = createModuleRevisionId(dependency);
DefaultDependencyDescriptor dependencyDescriptor = new DefaultDependencyDescriptor(parent, moduleRevisionId, false, false, dependency.isTransitive());
addExcludesArtifactsAndDependencies(configuration, dependency, dependencyDescriptor);
return new DefaultProjectDependencyMetaData(dependencyDescriptor, projectDependency);
}