use of org.gradle.api.artifacts.ModuleVersionIdentifier in project gradle by gradle.
the class DefaultIvyPublication method getArtifactFileName.
private String getArtifactFileName(String classifier, String extension) {
StringBuilder artifactPath = new StringBuilder();
ModuleVersionIdentifier coordinates = getCoordinates();
artifactPath.append(coordinates.getName());
artifactPath.append('-');
artifactPath.append(coordinates.getVersion());
if (GUtil.isTrue(classifier)) {
artifactPath.append('-');
artifactPath.append(classifier);
}
if (GUtil.isTrue(extension)) {
artifactPath.append('.');
artifactPath.append(extension);
}
return artifactPath.toString();
}
use of org.gradle.api.artifacts.ModuleVersionIdentifier in project gradle by gradle.
the class DefaultIvyPublication method addProjectDependency.
private void addProjectDependency(ProjectDependency dependency, String confMapping) {
ModuleVersionIdentifier identifier = projectDependencyResolver.resolve(ModuleVersionIdentifier.class, dependency);
ivyDependencies.add(new DefaultIvyDependency(identifier.getGroup(), identifier.getName(), identifier.getVersion(), confMapping, dependency.isTransitive(), Collections.<DependencyArtifact>emptyList(), dependency.getExcludeRules()));
}
use of org.gradle.api.artifacts.ModuleVersionIdentifier in project gradle by gradle.
the class DefaultImmutableModuleIdentifierFactory method moduleWithVersion.
@Override
public ModuleVersionIdentifier moduleWithVersion(String group, String name, String version) {
ModuleIdentifier mi = module(group, name);
Map<String, ModuleVersionIdentifier> byVersion = idToVersions.get(mi);
if (byVersion == null) {
byVersion = idToVersions.get(mi);
if (byVersion == null) {
byVersion = Maps.newConcurrentMap();
idToVersions.put(mi, byVersion);
}
}
ModuleVersionIdentifier identifier = byVersion.get(version);
if (identifier == null) {
identifier = new DefaultModuleVersionIdentifier(mi, version);
byVersion.put(version, identifier);
}
return identifier;
}
use of org.gradle.api.artifacts.ModuleVersionIdentifier in project gradle by gradle.
the class ResolvedConfigurationIdentifierSerializer method read.
public ResolvedConfigurationIdentifier read(Decoder decoder) throws IOException {
ModuleVersionIdentifier id = idSerializer.read(decoder);
String configuration = decoder.readString();
return new ResolvedConfigurationIdentifier(id, configuration);
}
use of org.gradle.api.artifacts.ModuleVersionIdentifier in project gradle by gradle.
the class DefaultConfiguration method toRootComponentMetaData.
public ComponentResolveMetadata toRootComponentMetaData() {
Module module = getModule();
ComponentIdentifier componentIdentifier = componentIdentifierFactory.createComponentIdentifier(module);
ModuleVersionIdentifier moduleVersionIdentifier = moduleIdentifierFactory.moduleWithVersion(module.getGroup(), module.getName(), module.getVersion());
ProjectInternal project = projectFinder.findProject(module.getProjectPath());
AttributesSchemaInternal schema = project == null ? null : (AttributesSchemaInternal) project.getDependencies().getAttributesSchema();
DefaultLocalComponentMetadata metaData = new DefaultLocalComponentMetadata(moduleVersionIdentifier, componentIdentifier, module.getStatus(), schema);
configurationComponentMetaDataBuilder.addConfigurations(metaData, configurationsProvider.getAll());
return metaData;
}
Aggregations