Skip to content

Commit

Permalink
PiperOrigin-RevId: 210388413
Browse files Browse the repository at this point in the history
  • Loading branch information
Googler authored and Copybara-Service committed Aug 27, 2018
1 parent cd57e6c commit 0cfed02
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,19 @@ public static ImmutableList<Artifact> getGeneratedOutputs(RuleContext ruleContex
return getGeneratedOutputs(ruleContext, protoSources, extension, false);
}

public static ImmutableList<Artifact> getGeneratedTreeArtifactOutputs(
RuleContext ruleContext, ImmutableList<Artifact> protoSources, PathFragment directory) {
ImmutableList.Builder<Artifact> outputsBuilder = new ImmutableList.Builder<>();
if (!protoSources.isEmpty()) {
ArtifactRoot genfiles =
ruleContext
.getConfiguration()
.getGenfilesDirectory(ruleContext.getRule().getRepository());
outputsBuilder.add(ruleContext.getTreeArtifact(directory, genfiles));
}
return outputsBuilder.build();
}

/**
* Returns the .proto files that are the direct srcs of the direct-dependencies of this rule. If
* the current rule is an alias proto_library (=no srcs), we use the direct srcs of the
Expand Down

0 comments on commit 0cfed02

Please sign in to comment.