Compile grpc-java from source

...instead of using checked-in binaries. Also update the
update instructions accordingly.

--
Change-Id: I5a52abbdc1c34883d179b4559064c464b958714f
Reviewed-on: https://cr.bazel.build/6831
MOS_MIGRATED_REVID=140348730
diff --git a/third_party/grpc/BUILD b/third_party/grpc/BUILD
index 1ed06b1..386813e 100644
--- a/third_party/grpc/BUILD
+++ b/third_party/grpc/BUILD
@@ -19,20 +19,15 @@
     runtime_deps = ["//third_party:netty"],
 )
 
-filegroup(
+cc_binary(
     name = "grpc-java-plugin",
-    srcs = select({
-        "//third_party:windows_mingw": ["protoc-gen-grpc-java-0.15.0-windows-x86_32.exe"],
-        "//third_party:windows_msys64_mingw64": ["protoc-gen-grpc-java-0.15.0-windows-x86_64.exe"],
-        "//third_party:windows_msys64": ["protoc-gen-grpc-java-0.15.0-windows-x86_64.exe"],
-        "//third_party:windows_clang": ["protoc-gen-grpc-java-0.15.0-windows-x86_64.exe"],
-        "//third_party:darwin": ["protoc-gen-grpc-java-0.15.0-osx-x86_64.exe"],
-        "//third_party:k8": ["protoc-gen-grpc-java-0.15.0-linux-x86_64.exe"],
-        "//third_party:piii": ["protoc-gen-grpc-java-0.15.0-linux-x86_32.exe"],
-        "//third_party:arm": ["protoc-gen-grpc-java-0.15.0-linux-x86_32.exe"],
-        "//third_party:freebsd": ["protoc-gen-grpc-java-0.15.0-linux-x86_32.exe"],
-        "//third_party:s390x": ["protoc-gen-grpc-java-0.15.0-linux-s390x_64.exe"],
-    }),
+    srcs = [
+        "compiler/src/java_plugin/cpp/java_generator.cpp",
+        "compiler/src/java_plugin/cpp/java_generator.h",
+        "compiler/src/java_plugin/cpp/java_plugin.cpp",
+    ],
+    copts = ["-w"],
+    deps = ["//third_party/protobuf:protoc_lib"],
 )
 
 cc_binary(
diff --git a/third_party/grpc/README.bazel.md b/third_party/grpc/README.bazel.md
index 36efce9..750f157 100644
--- a/third_party/grpc/README.bazel.md
+++ b/third_party/grpc/README.bazel.md
@@ -11,17 +11,12 @@
 
 How to update the Java plugin:
 
-Download it from Maven central. The project is called `protoc-gen-grpc-java`
-and the version is `0.15.0` .
+1. Take version `0.15.0` from https://github.com/grpc/grpc-java
+   commit hash is `b7d816fb3d0d38e`
+2. `cp -R <grpg-java git tree>/compiler/src/java_plugin third_party/grpc-java/compiler/src`
 
 How to update the Java code:
 
 Download it from Maven central. The jars are called `grpc-core`, `grpc-netty`,
 `grpc-protobuf`, `grpc-protobuf-lite`, `grpc-stub` and the version is
 `0.15.0`.
-
-* * *
-How to update the Linux s390x 64-bit Java plugin:
-
-1. Build Java plugin version `0.15.0` from https://github.com/grpc/grpc-java .
-2. `cp <gRPC git tree>/compiler/build/artifacts/java_plugin/protoc-gen-grpc-java.exe <Bazel tree>/third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-s390x_64.exe`