use of org.gradle.internal.component.local.model.DefaultLocalComponentMetadata in project gradle by gradle.
the class IncludedBuildDependencyMetadataBuilder method registerProject.
private void registerProject(IncludedBuild build, ProjectInternal project) {
LocalComponentRegistry localComponentRegistry = project.getServices().get(LocalComponentRegistry.class);
ProjectComponentIdentifier originalIdentifier = newProjectId(project);
DefaultLocalComponentMetadata originalComponent = (DefaultLocalComponentMetadata) localComponentRegistry.getComponent(originalIdentifier);
ProjectComponentIdentifier componentIdentifier = newProjectId(build, project.getPath());
LocalComponentMetadata compositeComponent = createCompositeCopy(build, componentIdentifier, originalComponent);
context.register(componentIdentifier, compositeComponent, project.getProjectDir());
for (LocalComponentArtifactMetadata artifactMetaData : localComponentRegistry.getAdditionalArtifacts(originalIdentifier)) {
context.registerAdditionalArtifact(componentIdentifier, createCompositeCopy(componentIdentifier, artifactMetaData));
}
}
use of org.gradle.internal.component.local.model.DefaultLocalComponentMetadata in project gradle by gradle.
the class IncludedBuildDependencySubstitutionsBuilder method registerProject.
private void registerProject(IncludedBuild build, ProjectInternal project) {
LocalComponentRegistry localComponentRegistry = project.getServices().get(LocalComponentRegistry.class);
ProjectComponentIdentifier originalIdentifier = newProjectId(project);
DefaultLocalComponentMetadata originalComponent = (DefaultLocalComponentMetadata) localComponentRegistry.getComponent(originalIdentifier);
ProjectComponentIdentifier componentIdentifier = newProjectId(build, project.getPath());
context.registerSubstitution(originalComponent.getId(), componentIdentifier);
}
use of org.gradle.internal.component.local.model.DefaultLocalComponentMetadata 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.internal.component.local.model.DefaultLocalComponentMetadata in project gradle by gradle.
the class IncludedBuildDependencyMetadataBuilder method registerProject.
private void registerProject(Map<ProjectComponentIdentifier, RegisteredProject> registeredProjects, IncludedBuildInternal build, ProjectInternal project) {
LocalComponentRegistry localComponentRegistry = project.getServices().get(LocalComponentRegistry.class);
ProjectComponentIdentifier originalIdentifier = newProjectId(project);
DefaultLocalComponentMetadata originalComponent = (DefaultLocalComponentMetadata) localComponentRegistry.getComponent(originalIdentifier);
ProjectComponentIdentifier componentIdentifier = build.idForProjectInThisBuild(project.getPath());
LocalComponentMetadata compositeComponent = createCompositeCopy(build.getModel(), componentIdentifier, originalComponent);
registeredProjects.put(componentIdentifier, new RegisteredProject(compositeComponent));
}
use of org.gradle.internal.component.local.model.DefaultLocalComponentMetadata 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;
}
Aggregations