Пример #1
0
 private ModuleVersionSpec getSelector(List<DependencyEdge> transitiveEdges) {
   ModuleVersionSpec selector;
   if (transitiveEdges.isEmpty()) {
     selector = ModuleVersionSpec.forExcludes(); // includes all
   } else {
     selector = transitiveEdges.get(0).getSelector();
     for (int i = 1; i < transitiveEdges.size(); i++) {
       DependencyEdge dependencyEdge = transitiveEdges.get(i);
       selector = selector.union(dependencyEdge.getSelector());
     }
   }
   selector = selector.intersect(ModuleVersionSpec.forExcludes(metaData.getExcludeRules()));
   return selector;
 }
 private ModuleResolutionFilter getSelector(List<DependencyEdge> transitiveEdges) {
   ModuleResolutionFilter resolutionFilter;
   if (transitiveEdges.isEmpty()) {
     resolutionFilter = DefaultModuleResolutionFilter.all();
   } else {
     resolutionFilter = transitiveEdges.get(0).getSelector();
     for (int i = 1; i < transitiveEdges.size(); i++) {
       DependencyEdge dependencyEdge = transitiveEdges.get(i);
       resolutionFilter = resolutionFilter.union(dependencyEdge.getSelector());
     }
   }
   resolutionFilter =
       resolutionFilter.intersect(
           DefaultModuleResolutionFilter.excludeAny(metaData.getExcludeRules()));
   return resolutionFilter;
 }