diff --git a/buildscripts/kokoro/android.sh b/buildscripts/kokoro/android.sh index 08dc65b45d..9bae03a2fc 100755 --- a/buildscripts/kokoro/android.sh +++ b/buildscripts/kokoro/android.sh @@ -25,7 +25,6 @@ buildscripts/make_dependencies.sh # Build grpc-cronet pushd cronet -./cronet_deps.sh ../gradlew build popd diff --git a/cronet/README.md b/cronet/README.md index d0304aaf33..42864b087d 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 153dc326fb..46efdfab64 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 e07c47a5f4..0000000000 --- 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/