Adds a dependency from 'targets' to 'sources'

        Both 'targets' and 'sources' can be either list
        of target names, or a single target name.
335818
def add_dependency (self, targets, sources):
        
        if isinstance (targets, str):
            targets = [targets]
        if isinstance (sources, str):
            sources = [sources]
        assert is_iterable(targets)
        assert is_iterable(sources)

        for target in targets:
            for source in sources:
                self.do_add_dependency (target, source)
157620
public function addOrReplaceTarget($targetName, &$target)
    {
        $this->log("  +Target: $targetName", Project::MSG_DEBUG);
        $target->setProject($this);
        $this->targets[$targetName] = $target;

        $ctx = $this->getReference(ProjectConfigurator::PARSING_CONTEXT_REFERENCE);
        $current = $ctx->getCurrentTargets();
        $current[$targetName] = $target;
    }
60942
def add_targets_to_INSTALLED_FILES(target, source, env):
    
    global _INSTALLED_FILES, _UNIQUE_INSTALLED_FILES
    _INSTALLED_FILES.extend(target)

    _UNIQUE_INSTALLED_FILES = None
    return (target, source)
53719
def add_source(self, source):
        """"""
        nodes = [n for n in self.nodes() if not isinstance(n, Source)]
        source.connect(whom=nodes)
473504
private static void addDependency(List<Dependency> dependencies, MavenCoordinates requiredArtifact, Constants.ArtifactType type, String scope) {
		Dependency dependency = new Dependency();
		dependency.setGroupId(requiredArtifact.getGroupId());
		dependency.setArtifactId(requiredArtifact.getArtifactId());
		dependency.setVersion(requiredArtifact.getVersion());

		if(scope!=null){
			dependency.setScope(scope);
		}
		if (type != null) {
			dependency.setType(type.getType());
		}
		dependencies.add(dependency);
	}
246896
def add_source(self, tier):
        
        tier.add_dest(self)
        self.sources.append(tier)
99383
def add_versioned_targets_to_INSTALLED_FILES(target, source, env):
    
    global _INSTALLED_FILES, _UNIQUE_INSTALLED_FILES
    Verbose = False
    _INSTALLED_FILES.extend(target)
    if Verbose:
        print("add_versioned_targets_to_INSTALLED_FILES: target={:r}".format(list(map(str, target))))
    symlinks = listShlibLinksToInstall(target[0], source, env)
    if symlinks:
        SCons.Tool.EmitLibSymlinks(env, symlinks, target[0])
    _UNIQUE_INSTALLED_FILES = None
    return (target, source)
1151608
function updateExternalDependencies(oldName, newName) {
      sourcePackages.forEach(function(p) {
        var index = p.dependencies.indexOf(oldName);
        if (index !== -1) {
          if (p.name === newName || p.dependencies.indexOf(newName) !== -1) {
            // If the package has the same name as the one we are trying to
            // update to, then we are trying to update the package to point
            // to itself as a dependency, which isn't possible so just remove
            // the old dependency. Alternatively, if the package already has
            // the new name, then we can simply remove the old one and move on.
            p.dependencies.splice(index, 1);
          } else {
            // If the package is NOT trying to update to itself and does NOT
            // have the new dependency already, then add it in place of the
            // old one.
            p.dependencies.splice(index, 1, newName);
          }
        }
      });
    }
31218
private void addDependency(String symbol, Set<String> seen, List<String> list)
      throws ServiceException {
    DependencyInfo dependency = getDependencyInfo(symbol);
    if (dependency == null) {
      if (this.strictRequires) {
        throw new ServiceException("Unknown require of " + symbol);
      }
    } else if (!seen.containsAll(dependency.getProvides())) {
      seen.addAll(dependency.getProvides());
      for (String require : dependency.getRequiredSymbols()) {
        addDependency(require, seen, list);
      }
      list.add(dependency.getPathRelativeToClosureBase());
    }
  }
1342658
def add_sources(self, sources):
        """"""
        # TODO(batch):  extend to multiple batches
        assert (len(self.batches) == 1)
        # TODO(batch):  remove duplicates?
        sources = [x for x in sources if x not in self.batches[0].sources]
        self.batches[0].sources.extend(sources)
1190598
public void add(Collection<ConfigurationMetadataSource> sources) {
		for (ConfigurationMetadataSource source : sources) {
			String groupId = source.getGroupId();
			ConfigurationMetadataGroup group = this.allGroups.get(groupId);
			if (group == null) {
				group = new ConfigurationMetadataGroup(groupId);
				this.allGroups.put(groupId, group);
			}
			String sourceType = source.getType();
			if (sourceType != null) {
				putIfAbsent(group.getSources(), sourceType, source);
			}
		}
	}
99371
public final void addTarget(@NotNull final Target target) {
        Contract.requireArgNotNull("target", target);
        if (targets == null) {
            targets = new ArrayList<>();
        }
        targets.add(target);
    }
632095
def add_dependency(self, name, obj):
        """"""

        if name in self._deps:
            if self._deps[name] is obj:
                return
            raise ValueError(
                "There exists a different dep with the same name : %r" % name)
        self._deps[name] = obj
139957
def dependencies(names)
      names.each do |name|
        calculation = fetch(name, nil)
        next unless calculation

        calculation.dependencies.each do |dependency|
          names << dependency unless names.include?(dependency)
        end
      end
    end
1235465
public static void addDependency(Dependency depend)
  {
    ClassLoader loader = Thread.currentThread().getContextClassLoader();

    addDependency(depend, loader);
  }
485779
def add_dependency(self, address):
    """"""
    if address in self._dependencies_by_address:
      if self._dependencies_by_address[address].has_comment():
        logger.warn('BuildFileManipulator would have added {address} as a dependency of '
                    '{target_address}, but that dependency was already forced with a comment.'
                    .format(address=address.spec, target_address=self.target_address.spec))
        return
    spec = address.reference(referencing_path=self.build_file.spec_path)
    self._dependencies_by_address[address] = DependencySpec(spec)
500015
def add_alternative (self, target_instance):
        
        assert isinstance(target_instance, AbstractTarget)
        if self.built_main_targets_:
            raise IllegalOperation ("add-alternative called when main targets are already created for project '%s'" % self.full_name ())

        self.alternatives_.append (target_instance)