use of org.gradle.api.internal.artifacts.Module in project gradle by gradle.
the class DefaultProjectLocalComponentProvider method getLocalComponentMetaData.
private LocalComponentMetadata getLocalComponentMetaData(ProjectInternal project) {
Module module = project.getModule();
ModuleVersionIdentifier moduleVersionIdentifier = moduleIdentifierFactory.moduleWithVersion(module.getGroup(), module.getName(), module.getVersion());
ComponentIdentifier componentIdentifier = newProjectId(project);
DefaultLocalComponentMetadata metaData = new DefaultLocalComponentMetadata(moduleVersionIdentifier, componentIdentifier, module.getStatus(), (AttributesSchemaInternal) project.getDependencies().getAttributesSchema());
metaDataBuilder.addConfigurations(metaData, project.getConfigurations().withType(ConfigurationInternal.class));
return metaData;
}
use of org.gradle.api.internal.artifacts.Module in project gradle by gradle.
the class ShortCircuitEmptyConfigurationResolver method emptyGraph.
private void emptyGraph(ConfigurationInternal configuration, ResolverResults results) {
Module module = configuration.getModule();
ModuleVersionIdentifier id = moduleIdentifierFactory.moduleWithVersion(module);
ComponentIdentifier componentIdentifier = componentIdentifierFactory.createComponentIdentifier(module);
ResolutionResult emptyResult = DefaultResolutionResultBuilder.empty(id, componentIdentifier);
ResolvedLocalComponentsResult emptyProjectResult = new ResolvedLocalComponentsResultGraphVisitor(thisBuild.getCurrentBuild());
results.graphResolved(emptyResult, emptyProjectResult, new EmptyResults());
}
use of org.gradle.api.internal.artifacts.Module in project gradle by gradle.
the class DefaultRootComponentMetadataBuilder method toRootComponentMetaData.
@Override
public ComponentResolveMetadata toRootComponentMetaData() {
Module module = metadataProvider.getModule();
ComponentIdentifier componentIdentifier = componentIdentifierFactory.createComponentIdentifier(module);
DefaultLocalComponentMetadata metadata = holder.tryCached(componentIdentifier);
if (metadata == null) {
metadata = buildRootComponentMetadata(module, componentIdentifier);
holder.cachedValue = metadata;
}
return metadata;
}
use of org.gradle.api.internal.artifacts.Module 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);
}
use of org.gradle.api.internal.artifacts.Module in project gradle by gradle.
the class DefaultConfiguration method toRootComponentMetaData.
public ComponentResolveMetadata toRootComponentMetaData() {
Module module = getModule();
ComponentIdentifier componentIdentifier = componentIdentifierFactory.createComponentIdentifier(module);
ModuleVersionIdentifier moduleVersionIdentifier = moduleIdentifierFactory.moduleWithVersion(module.getGroup(), module.getName(), module.getVersion());
ProjectInternal project = projectFinder.findProject(module.getProjectPath());
AttributesSchemaInternal schema = project == null ? null : (AttributesSchemaInternal) project.getDependencies().getAttributesSchema();
DefaultLocalComponentMetadata metaData = new DefaultLocalComponentMetadata(moduleVersionIdentifier, componentIdentifier, module.getStatus(), schema);
configurationComponentMetaDataBuilder.addConfigurations(metaData, configurationsProvider.getAll());
return metaData;
}
Aggregations