use of org.gradle.internal.component.model.Exclude in project gradle by gradle.
the class ModuleExclusions method excludeAny.
public ModuleExclusion excludeAny(List<Exclude> excludes, Set<String> hierarchy) {
Map<Set<String>, ModuleExclusion> exclusionMap = cachedExcludes.get(excludes);
if (exclusionMap == null) {
exclusionMap = Maps.newConcurrentMap();
cachedExcludes.put(excludes, exclusionMap);
}
ModuleExclusion moduleExclusion = exclusionMap.get(hierarchy);
if (moduleExclusion == null) {
List<Exclude> filtered = Lists.newArrayList();
for (Exclude exclude : excludes) {
for (String config : exclude.getConfigurations()) {
if (hierarchy.contains(config)) {
filtered.add(exclude);
break;
}
}
}
moduleExclusion = excludeAny(filtered);
exclusionMap.put(hierarchy, moduleExclusion);
}
return moduleExclusion;
}
use of org.gradle.internal.component.model.Exclude 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());
}
}
Aggregations