code: private List<PBXObjectRef> addSources(final Map objects, final String sourceTree, final String basePath,
        final Map<String, TargetInfo> targets) {
      final List<PBXObjectRef> sourceGroupChildren = new ArrayList<>();
  
      final List<File> sourceList = new ArrayList<>(targets.size());
      for (final TargetInfo info : targets.values()) {
        final File[] targetsources = info.getSources();
        Collections.addAll(sourceList, targetsources);
      }
      final File[] sortedSources = sourceList.toArray(new File[sourceList.size()]);
      Arrays.sort(sortedSources, new Comparator<File>() {
        @Override
        public int compare(final File o1, final File o2) {
          return o1.getName().compareTo(o2.getName());
        }
      });
      for (final File sortedSource : sortedSources) {
        final PBXObjectRef fileRef = createPBXFileReference(sourceTree, basePath, sortedSource);
        sourceGroupChildren.add(fileRef);
        objects.put(fileRef.getID(), fileRef.getProperties());
      }
  
      return sourceGroupChildren;
    }
docs: Add file references for all source files to map of objects.
  
  @param objects
  map of objects.
  @param sourceTree
  source tree.
  @param basePath
  parent of XCode project dir
  @param targets
  build targets.
  @return list containing file references of source files.