use of org.gradle.api.internal.artifacts.ivyservice.projectmodule.LocalComponentRegistry 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.api.internal.artifacts.ivyservice.projectmodule.LocalComponentRegistry 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);
}
Aggregations