use of org.gradle.internal.component.external.model.ModuleDependencyMetadata in project gradle by gradle.
the class ClientModuleResolver method resolve.
public void resolve(ComponentIdentifier identifier, ComponentOverrideMetadata componentOverrideMetadata, BuildableComponentResolveResult result) {
resolver.resolve(identifier, componentOverrideMetadata, result);
if (result.getFailure() != null) {
return;
}
ClientModule clientModule = componentOverrideMetadata.getClientModule();
if (clientModule != null) {
ModuleComponentResolveMetadata originalMetadata = (ModuleComponentResolveMetadata) result.getMetadata();
List<ModuleDependencyMetadata> clientModuleDependencies = createClientModuleDependencies(identifier, clientModule);
ModuleComponentArtifactMetadata clientModuleArtifact = createClientModuleArtifact(originalMetadata);
ClientModuleComponentResolveMetadata clientModuleMetaData = new ClientModuleComponentResolveMetadata(originalMetadata, clientModuleArtifact, clientModuleDependencies);
result.setMetadata(clientModuleMetaData);
}
}
use of org.gradle.internal.component.external.model.ModuleDependencyMetadata in project gradle by gradle.
the class ClientModuleResolver method createClientModuleDependencies.
private List<ModuleDependencyMetadata> createClientModuleDependencies(ComponentIdentifier identifier, ClientModule clientModule) {
List<ModuleDependencyMetadata> dependencies = Lists.newArrayList();
for (ModuleDependency moduleDependency : clientModule.getDependencies()) {
ModuleDependencyMetadata dependencyMetadata = createDependencyMetadata(identifier, moduleDependency);
dependencies.add(dependencyMetadata);
}
return dependencies;
}
use of org.gradle.internal.component.external.model.ModuleDependencyMetadata in project gradle by gradle.
the class AbstractDependencyMetadataAdapter method version.
@Override
public T version(Action<? super MutableVersionConstraint> configureAction) {
DefaultMutableVersionConstraint mutableVersionConstraint = new DefaultMutableVersionConstraint(getVersionConstraint());
configureAction.execute(mutableVersionConstraint);
ModuleDependencyMetadata dependencyMetadata = getOriginalMetadata().withRequestedVersion(mutableVersionConstraint);
updateMetadata(dependencyMetadata);
return Cast.uncheckedCast(this);
}
Aggregations