diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java index 3a89fa5aeb..81f9eac0aa 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java @@ -117,6 +117,16 @@ public final class BuildEventId implements Serializable { BuildEventStreamProtos.BuildEventId.newBuilder().setTargetCompleted(targetId).build()); } + public static BuildEventId aspectCompleted(Label target, String aspect) { + BuildEventStreamProtos.BuildEventId.TargetCompletedId targetId = + BuildEventStreamProtos.BuildEventId.TargetCompletedId.newBuilder() + .setLabel(target.toString()) + .setAspect(aspect) + .build(); + return new BuildEventId( + BuildEventStreamProtos.BuildEventId.newBuilder().setTargetCompleted(targetId).build()); + } + public static BuildEventId fromCause(Cause cause) { return new BuildEventId(cause.getIdProto()); } |