diff options
author | Karl Shaffer <karlshaffer@google.com> | 2020-11-18 23:19:06 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-11-18 23:19:06 +0000 |
commit | 7b5246a00c43b5f1d2b01733389eb13fcb66a1aa (patch) | |
tree | 89f5d5958ca0ab30d667070f2c36f1392e9eeab0 | |
parent | 8b75b1150b7026f872fa64ef402489c2c41fd453 (diff) | |
parent | 8e51fde6c2065d6091b0dbd501fdf080f48c769f (diff) | |
download | grpc-grpc-java-7b5246a00c43b5f1d2b01733389eb13fcb66a1aa.tar.gz |
Add a lite OkHttp gRPC Client Library. am: 8e51fde6c2
Original change: https://android-review.googlesource.com/c/platform/external/grpc-grpc-java/+/1503871
Change-Id: Ie1268a8709dc05e79827a1d3881a8137e9542fa1
-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", } |