Skip to content

Commit

Permalink
Description redacted.
Browse files Browse the repository at this point in the history
--
MOS_MIGRATED_REVID=86685664
  • Loading branch information
loburm authored and hanwen committed Feb 19, 2015
1 parent 6916be2 commit 697ee69
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.RuleConfiguredTarget.Mode;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.util.FileType;
import com.google.devtools.build.lib.util.FileTypeSet;

Expand Down Expand Up @@ -51,6 +53,16 @@ static PrerequisiteArtifacts get(RuleContext ruleContext, String attributeName,
return new PrerequisiteArtifacts(ruleContext, attributeName, ImmutableList.copyOf(result));
}

public static NestedSet<Artifact> nestedSet(RuleContext ruleContext, String attributeName,
Mode mode) {
NestedSetBuilder<Artifact> result = NestedSetBuilder.stableOrder();
for (FileProvider target :
ruleContext.getPrerequisites(attributeName, mode, FileProvider.class)) {
result.addTransitive(target.getFilesToBuild());
}
return result.build();
}

/**
* Returns the artifacts this instance contains in an {@link ImmutableList}.
*/
Expand Down

0 comments on commit 697ee69

Please sign in to comment.