Add interfaces for the build event protocol

Bazel in the will provide a machine-readable stream of important build
events. These interfaces set up the framework and expectations about
the produced events and the entities distributing those events.

--
Change-Id: If2c3b2e11c31b0136b57eadeef2d2f8f8fe5e2e7
Reviewed-on: https://bazel-review.googlesource.com/#/c/6272
MOS_MIGRATED_REVID=134522369
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index a5141e8..f4939c1 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -16,7 +16,7 @@
 
 # Script for building bazel from scratch without bazel
 
-PROTO_FILES=$(ls src/main/protobuf/*.proto)
+PROTO_FILES=$(ls src/main/protobuf/*.proto src/main/java/com/google/devtools/build/lib/buildeventstream/proto/*.proto)
 LIBRARY_JARS=$(find third_party -name '*.jar' | grep -Fv /javac.jar | grep -Fv /javac7.jar | grep -Fv JavaBuilder | grep -ve third_party/grpc/grpc.*jar | tr "\n" " ")
 GRPC_JAVA_VERSION=0.15.0
 GRPC_LIBRARY_JARS=$(find third_party/grpc -name '*.jar' | grep -e .*${GRPC_JAVA_VERSION}.*jar | tr "\n" " ")
@@ -180,7 +180,9 @@
 if [ -z "${BAZEL_SKIP_JAVA_COMPILATION}" ]; then
   log "Compiling Java stubs for protocol buffers..."
   for f in $PROTO_FILES ; do
-    run "${PROTOC}" -Isrc/main/protobuf/ --java_out=${OUTPUT_DIR}/src \
+    run "${PROTOC}" -Isrc/main/protobuf/ \
+        -Isrc/main/java/com/google/devtools/build/lib/buildeventstream/proto/ \
+        --java_out=${OUTPUT_DIR}/src \
         --plugin=protoc-gen-grpc="${GRPC_JAVA_PLUGIN-}" \
         --grpc_out=${OUTPUT_DIR}/src "$f"
   done