code: List<ResourceSet> computeResourceSetList() {
          List<ResourceSet> sourceFolderSets = resSetSupplier.get();
          int size = sourceFolderSets.size() + 4;
          if (libraries != null) {
              size += libraries.getArtifacts().size();
          }
  
          List<ResourceSet> resourceSetList = Lists.newArrayListWithExpectedSize(size);
  
          // add at the beginning since the libraries are less important than the folder based
          // resource sets.
          // get the dependencies first
          if (libraries != null) {
              Set<ResolvedArtifactResult> libArtifacts = libraries.getArtifacts();
              // the order of the artifact is descending order, so we need to reverse it.
              for (ResolvedArtifactResult artifact : libArtifacts) {
                  ResourceSet resourceSet =
                          new ResourceSet(
                                  MergeManifests.getArtifactName(artifact),
                                  null,
                                  null,
                                  validateEnabled);
                  resourceSet.setFromDependency(true);
                  resourceSet.addSource(artifact.getFile());
  
                  // add to 0 always, since we need to reverse the order.
                  resourceSetList.add(0,resourceSet);
              }
          }
  
          // add the folder based next
          resourceSetList.addAll(sourceFolderSets);
  
          // We add the generated folders to the main set
          List<File> generatedResFolders = Lists.newArrayList();
  
          generatedResFolders.addAll(renderscriptResOutputDir.getFiles());
          generatedResFolders.addAll(generatedResOutputDir.getFiles());
  
          // add the generated files to the main set.
          final ResourceSet mainResourceSet = sourceFolderSets.get(0);
          assert mainResourceSet.getConfigName().equals(BuilderConstants.MAIN);
          mainResourceSet.addSources(generatedResFolders);
  
          return resourceSetList;
      }
docs: Compute the list of resource set to be used during execution based all the inputs.