diff options
author | Karl Shaffer <karlshaffer@google.com> | 2020-11-19 00:46:21 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-11-19 00:46:21 +0000 |
commit | 2c3772b7cd26d6fef3329cbb1eb827447ced42d8 (patch) | |
tree | 89f5d5958ca0ab30d667070f2c36f1392e9eeab0 | |
parent | bd5c721bfd894256fd20273bb6343492c1d8f7bd (diff) | |
parent | e1e589552790c973ce73121d790726ecc2c52e30 (diff) | |
download | grpc-grpc-java-2c3772b7cd26d6fef3329cbb1eb827447ced42d8.tar.gz |
Add a lite OkHttp gRPC Client Library. am: 8e51fde6c2 am: 7b5246a00c am: b41363ac7d am: e1e5895527
Original change: https://android-review.googlesource.com/c/platform/external/grpc-grpc-java/+/1503871
Change-Id: I1e9888e161df93940d49f2fedbfee4b8a0bb57f1
-rw-r--r-- | Android.bp | 14 | ||||
-rw-r--r-- | annotation-stubs/Android.bp | 4 | ||||
-rw-r--r-- | context/Android.bp | 3 | ||||
-rw-r--r-- | core/Android.bp | 27 | ||||
-rw-r--r-- | okhttp/Android.bp | 4 | ||||
-rw-r--r-- | protobuf-lite/Android.bp | 6 | ||||
-rw-r--r-- | stub/Android.bp | 4 |
7 files changed, 52 insertions, 10 deletions
diff --git a/Android.bp b/Android.bp index 3b61d0847..0fa5a64d5 100644 --- a/Android.bp +++ b/Android.bp @@ -28,3 +28,17 @@ java_library_host { "grpc-java-stub", ] } + +java_library { + name: "grpc-java-okhttp-client-lite", + host_supported: true, + static_libs: [ + "grpc-java-stub", + "grpc-java-context", + "grpc-java-core", + "grpc-java-core-internal", + "grpc-java-protobuf-lite", + "grpc-java-okhttp", + ], + sdk_version: "current", +}
\ No newline at end of file diff --git a/annotation-stubs/Android.bp b/annotation-stubs/Android.bp index 32d177a81..78cb49daa 100644 --- a/annotation-stubs/Android.bp +++ b/annotation-stubs/Android.bp @@ -13,11 +13,13 @@ // limitations under the License. // -java_library_host { +java_library { name: "grpc-java-annotation-stubs", + host_supported: true, srcs: [ ":grpc-java-annotation-stubs-srcjar", ], + sdk_version: "current", } gensrcs { diff --git a/context/Android.bp b/context/Android.bp index d7a89b819..410ce78c4 100644 --- a/context/Android.bp +++ b/context/Android.bp @@ -14,7 +14,7 @@ // // -java_library_static { +java_library { name: "grpc-java-context", host_supported: true, srcs: [ @@ -25,4 +25,5 @@ java_library_static { "guava", "jsr305", ], + sdk_version: "current", } diff --git a/core/Android.bp b/core/Android.bp index ed371b0d0..9bfddc42f 100644 --- a/core/Android.bp +++ b/core/Android.bp @@ -13,8 +13,9 @@ // limitations under the License. // -java_library_host { +java_library { name: "grpc-java-core", + host_supported: true, srcs: [ "src/main/java/io/grpc/*.java", ], @@ -26,10 +27,12 @@ java_library_host { "jsr305", "guava", ], + sdk_version: "current", } -java_library_host { +java_library { name: "grpc-java-core-inprocess", + host_supported: true, srcs: [ "src/main/java/io/grpc/inprocess/*.java", ], @@ -40,10 +43,12 @@ java_library_host { "jsr305", "guava", ], + sdk_version: "current", } -java_library_host { +java_library { name: "grpc-java-core-internal", + host_supported: true, srcs: [ "src/main/java/io/grpc/internal/*.java", ], @@ -58,10 +63,23 @@ java_library_host { "opencensus-java-api", "opencensus-java-contrib-grpc-metrics", ], + target: { + + // For the Android variant, ignore this class since it is optional, + // uses javax APIs not available on Android, and is used reflectively + // so ignoring it does not affect the functionality of the library. + android: { + exclude_srcs: [ + "src/main/java/io/grpc/internal/JndiResourceResolverFactory.java", + ], + }, + }, + sdk_version: "current", } -java_library_host { +java_library { name: "grpc-java-core-util", + host_supported: true, srcs: [ "src/main/java/io/grpc/util/*.java", ], @@ -71,4 +89,5 @@ java_library_host { "jsr305", "guava", ], + sdk_version: "current", } diff --git a/okhttp/Android.bp b/okhttp/Android.bp index dd0906d6e..4e329f276 100644 --- a/okhttp/Android.bp +++ b/okhttp/Android.bp @@ -13,8 +13,9 @@ // limitations under the License. // -java_library_host { +java_library { name: "grpc-java-okhttp", + host_supported: true, srcs: [ "third_party/okhttp/main/java/**/*.java", "src/main/java/**/*.java", @@ -31,4 +32,5 @@ java_library_host { static_libs: [ "okhttp-norepackage", ], + sdk_version: "current", } diff --git a/protobuf-lite/Android.bp b/protobuf-lite/Android.bp index a8374f5be..f1c46518b 100644 --- a/protobuf-lite/Android.bp +++ b/protobuf-lite/Android.bp @@ -14,8 +14,9 @@ // // -java_library_host { +java_library { name: "grpc-java-protobuf-lite", + host_supported: true, srcs: [ "src/main/java/**/*.java", ], @@ -23,6 +24,7 @@ java_library_host { "grpc-java-core", "guava", "jsr305", - "libprotobuf-java-full", + "libprotobuf-java-lite", ], + sdk_version: "current", } diff --git a/stub/Android.bp b/stub/Android.bp index 4a56f7eef..af5270121 100644 --- a/stub/Android.bp +++ b/stub/Android.bp @@ -14,8 +14,9 @@ // // -java_library_host { +java_library { name: "grpc-java-stub", + host_supported: true, srcs: [ "src/main/java/**/*.java", ], @@ -25,4 +26,5 @@ java_library_host { "guava", "jsr305", ], + sdk_version: "current", } |