aboutsummaryrefslogtreecommitdiff
path: root/protobuf
diff options
context:
space:
mode:
authorHadrien Zalek <hzalek@google.com>2020-05-26 21:51:30 -0700
committerHadrien Zalek <hzalek@google.com>2020-06-03 00:22:23 -0700
commit2d04a324870582b87e05dbffbe9fe0d77dab1cf1 (patch)
tree04652f0b6ae382f635cc5565422cdb1a146a7c75 /protobuf
parent830181d779c33ae6b8a04ab428974bc0752c62b2 (diff)
downloadgrpc-grpc-java-2d04a324870582b87e05dbffbe9fe0d77dab1cf1.tar.gz
Build the gRPC Java library from source
Build the library from source since the imported prebuilts are inconsistent and incomplete. For starters, the source is that of version 1.15.0 but the imported jars are those of version 1.14.0. More importantly the grpc-java-protobuf library depends on the grpc-java-protobuf-lite library that is not prebuilt. This causes runtime errors due to missing symbols that should have been caught at compile-time. The Soong build modules follow the upstream Bazel rules as closely as possible. Note that some static libraries were added to the grpc-java to maintain compatibility with other rules that depend on it since the original prebuilt grpc-java-core jar contained all sources under core/ which is not how the library is built using Bazel. Test: m grpc-java Test: Diffed the entries between the old and new jars Bug: 148404241 Change-Id: I060333a68848272d5d9e09c040c1e35451a408c6
Diffstat (limited to 'protobuf')
-rw-r--r--protobuf/Android.bp18
-rw-r--r--protobuf/grpc-protobuf-1.14.0.jarbin4870 -> 0 bytes
2 files changed, 14 insertions, 4 deletions
diff --git a/protobuf/Android.bp b/protobuf/Android.bp
index cec1d76aa..3e1d243f9 100644
--- a/protobuf/Android.bp
+++ b/protobuf/Android.bp
@@ -13,10 +13,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-// TODO: Build from source instead
-java_import_host {
+//
+
+java_library_host {
name: "grpc-java-protobuf",
- jars: [
- "grpc-protobuf-1.14.0.jar",
+ srcs: [
+ "src/main/java/**/*.java",
+ ],
+ libs: [
+ "grpc-java-core",
+ "grpc-java-protobuf-lite",
+ "com.google.api.grpc_proto-google-common-protos-prebuilt-jar",
+ "jsr305",
+ "guava",
+ "libprotobuf-java-full",
+ "libprotobuf-java-util-full",
],
}
diff --git a/protobuf/grpc-protobuf-1.14.0.jar b/protobuf/grpc-protobuf-1.14.0.jar
deleted file mode 100644
index c9bad6938..000000000
--- a/protobuf/grpc-protobuf-1.14.0.jar
+++ /dev/null
Binary files differ