Search in sources :

Example 1 with LocalComponentRegistry

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));
    }
}
Also used : DefaultLocalComponentMetadata(org.gradle.internal.component.local.model.DefaultLocalComponentMetadata) LocalComponentMetadata(org.gradle.internal.component.local.model.LocalComponentMetadata) DefaultLocalComponentMetadata(org.gradle.internal.component.local.model.DefaultLocalComponentMetadata) LocalComponentRegistry(org.gradle.api.internal.artifacts.ivyservice.projectmodule.LocalComponentRegistry) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier) LocalComponentArtifactMetadata(org.gradle.internal.component.local.model.LocalComponentArtifactMetadata)

Example 2 with LocalComponentRegistry

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);
}
Also used : DefaultLocalComponentMetadata(org.gradle.internal.component.local.model.DefaultLocalComponentMetadata) LocalComponentRegistry(org.gradle.api.internal.artifacts.ivyservice.projectmodule.LocalComponentRegistry) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier)

Aggregations

ProjectComponentIdentifier (org.gradle.api.artifacts.component.ProjectComponentIdentifier)2 LocalComponentRegistry (org.gradle.api.internal.artifacts.ivyservice.projectmodule.LocalComponentRegistry)2 DefaultLocalComponentMetadata (org.gradle.internal.component.local.model.DefaultLocalComponentMetadata)2 LocalComponentArtifactMetadata (org.gradle.internal.component.local.model.LocalComponentArtifactMetadata)1 LocalComponentMetadata (org.gradle.internal.component.local.model.LocalComponentMetadata)1