use of org.gradle.internal.component.model.IvyArtifactName in project gradle by gradle.
the class RealisedIvyModuleResolveMetadataSerializationHelper method writeExcludeRules.
private void writeExcludeRules(Encoder encoder, List<Exclude> excludes) throws IOException {
encoder.writeSmallInt(excludes.size());
for (Exclude exclude : excludes) {
encoder.writeString(exclude.getModuleId().getGroup());
encoder.writeString(exclude.getModuleId().getName());
IvyArtifactName artifact = exclude.getArtifact();
writeNullableArtifact(encoder, artifact);
writeStringSet(encoder, exclude.getConfigurations());
encoder.writeNullableString(exclude.getMatcher());
}
}
use of org.gradle.internal.component.model.IvyArtifactName in project gradle by gradle.
the class RealisedMavenModuleResolveMetadataSerializationHelper method readMavenDependency.
private MavenDependencyDescriptor readMavenDependency(Decoder decoder, Map<Integer, MavenDependencyDescriptor> deduplicationDependencyCache) throws IOException {
int mapping = decoder.readSmallInt();
if (mapping == deduplicationDependencyCache.size()) {
ModuleComponentSelector requested = getComponentSelectorSerializer().read(decoder);
IvyArtifactName artifactName = readNullableArtifact(decoder);
List<ExcludeMetadata> mavenExcludes = readMavenExcludes(decoder);
MavenScope scope = MavenScope.values()[decoder.readSmallInt()];
MavenDependencyType type = MavenDependencyType.values()[decoder.readSmallInt()];
MavenDependencyDescriptor mavenDependencyDescriptor = new MavenDependencyDescriptor(scope, type, requested, artifactName, mavenExcludes);
deduplicationDependencyCache.put(mapping, mavenDependencyDescriptor);
return mavenDependencyDescriptor;
} else {
MavenDependencyDescriptor mavenDependencyDescriptor = deduplicationDependencyCache.get(mapping);
assert mavenDependencyDescriptor != null;
return mavenDependencyDescriptor;
}
}
Aggregations