diff options
author | Eric Gribkoff <ericgribkoff@google.com> | 2018-06-04 20:16:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-04 20:16:02 -0700 |
commit | 8fd762fb8e6d11de6c09c84967620bdb84b71822 (patch) | |
tree | 25f5fa907d32cf521837c888aa4e6ba07c85dc3f /cronet | |
parent | 6dbe3921edd09553b5d87cc39eef485cb004d245 (diff) | |
download | grpc-grpc-java-8fd762fb8e6d11de6c09c84967620bdb84b71822.tar.gz |
cronet: use Cronet from Google's Maven repository (#4531)
Diffstat (limited to 'cronet')
-rw-r--r-- | cronet/README.md | 17 | ||||
-rw-r--r-- | cronet/build.gradle | 3 | ||||
-rwxr-xr-x | cronet/cronet_deps.sh | 6 |
3 files changed, 5 insertions, 21 deletions
diff --git a/cronet/README.md b/cronet/README.md index d0304aaf3..42864b087 100644 --- a/cronet/README.md +++ b/cronet/README.md @@ -3,8 +3,7 @@ gRPC Cronet Transport **EXPERIMENTAL:** *gRPC's Cronet transport is an experimental API, and is not yet integrated with our build system. Using Cronet with gRPC requires manually -integrating the Cronet libraries and the gRPC code in this directory into your -Android application.* +integrating the gRPC code in this directory into your Android application.* This code enables using the [Chromium networking stack (Cronet)](https://chromium.googlesource.com/chromium/src/+/master/components/cronet) @@ -17,10 +16,9 @@ Some advantages of using Cronet with gRPC: * Robust to Android network connectivity changes * Support for [QUIC](https://www.chromium.org/quic) -Cronet jars are not currently available on Maven. The instructions at -https://github.com/GoogleChrome/cronet-sample/blob/master/README.md describe -how to manually download the Cronet binaries and add them to your Android -application. You will also need to copy the gRPC source files contained in this +Cronet jars are available on Google's Maven repository. See the example app at +https://github.com/GoogleChrome/cronet-sample/blob/master/README.md. To use +Cronet with gRPC, you will need to copy the gRPC source files contained in this directory into your application's code, as we do not currently provide a `grpc-cronet` dependency. @@ -45,10 +43,3 @@ ExperimentalCronetEngine engine = ManagedChannel channel = CronetChannelBuilder.forAddress("localhost", 8080, engine).build(); ``` -## Running the tests with Gradle - -To run the gRPC Cronet tests with the included `gradle.build` file, you will -need to first download the Cronet jars and place them in the `libs/` directory. -The included script, `cronet_deps.sh`, will do this automatically but requires -the [gsutil](https://cloud.google.com/storage/docs/gsutil) tool to access files -from Google Cloud Storage. diff --git a/cronet/build.gradle b/cronet/build.gradle index 153dc326f..46efdfab6 100644 --- a/cronet/build.gradle +++ b/cronet/build.gradle @@ -51,8 +51,7 @@ dependencies { implementation 'io.grpc:grpc-core:1.14.0-SNAPSHOT' // CURRENT_GRPC_VERSION testImplementation 'io.grpc:grpc-testing:1.14.0-SNAPSHOT' // CURRENT_GRPC_VERSION - implementation files('libs/cronet_api.jar') - implementation files('libs/cronet_impl_common_java.jar') + implementation "org.chromium.net:cronet-embedded:66.3359.158" testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:1.10.19' diff --git a/cronet/cronet_deps.sh b/cronet/cronet_deps.sh deleted file mode 100755 index e07c47a5f..000000000 --- a/cronet/cronet_deps.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -mkdir libs -gsutil cp gs://chromium-cronet/android/67.0.3368.0/Release/cronet/cronet_api.jar libs/ -gsutil cp gs://chromium-cronet/android/67.0.3368.0/Release/cronet/cronet_impl_common_java.jar \ - libs/ |