use of org.gradle.internal.component.local.model.LocalComponentArtifactMetadata 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.LocalComponentArtifactMetadata in project gradle by gradle.
the class CompositeBuildIdeProjectResolver method buildArtifactFile.
/**
* Finds an IDE metadata artifact with the specified type, and executes tasks to build the artifact file.
*/
public File buildArtifactFile(ProjectComponentIdentifier project, String type) {
LocalComponentArtifactMetadata artifactMetaData = findArtifact(project, type);
if (artifactMetaData == null) {
return null;
}
artifactBuilder.build(artifactMetaData);
return artifactMetaData.getFile();
}
use of org.gradle.internal.component.local.model.LocalComponentArtifactMetadata in project gradle by gradle.
the class ProjectDependencyResolver method resolveArtifact.
@Override
public void resolveArtifact(ComponentArtifactMetadata artifact, ModuleSource moduleSource, BuildableArtifactResolveResult result) {
if (isProjectModule(artifact.getComponentId())) {
LocalComponentArtifactMetadata projectArtifact = (LocalComponentArtifactMetadata) artifact;
// Run any registered actions to build this artifact
artifactBuilder.build(projectArtifact);
File localArtifactFile = projectArtifact.getFile();
if (localArtifactFile != null) {
result.resolved(localArtifactFile);
} else {
result.notFound(projectArtifact.getId());
}
}
}
Aggregations