From 9b7330fb2ec743f6e36b53e71ca39459a4ab4282 Mon Sep 17 00:00:00 2001 From: Adam Michael Date: Thu, 23 Mar 2017 18:40:51 +0000 Subject: Simplify the steps needed to run android_integration_test. As of Bazel 0.4.5, the android_sdk_for_test and android_ndk_for_test are bound in android.WORKSPACE, so we do not need to include them in the main Bazel WORKSPACE file. I've update the comments to reflect that all that is needed to run the tests is android_sdk_repository and android_ndk_repository and the environment variables that they read. Also, delete scripts/workspace_user.sh. All of its functionality (reading environment variables, detecting api levels, build tools versions) is now part of android_{s,n}dk_repository. Fixes https://github.com/bazelbuild/bazel/issues/2284. -- PiperOrigin-RevId: 151032551 MOS_MIGRATED_REVID=151032551 --- WORKSPACE | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'WORKSPACE') diff --git a/WORKSPACE b/WORKSPACE index 140dd2c3d8..0f215c8a30 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,17 +8,6 @@ bind( actual = "//:dummy", ) -# Bind to dummy targets if no android SDK/NDK is present. -bind( - name = "android_sdk_for_testing", - actual = "//:dummy", -) - -bind( - name = "android_ndk_for_testing", - actual = "//:dummy", -) - # Protobuf code generation for GRPC requires three external labels: # //external:grpc-java_plugin # //external:grpc-jar @@ -42,10 +31,15 @@ bind( load("//tools/cpp/test:docker_repository.bzl", "docker_repository") docker_repository() -# In order to run the Android integration tests, run -# scripts/workspace_user.sh and uncomment the next two lines. -# load("/WORKSPACE.user", "android_repositories") -# android_repositories() +# To run the Android integration tests in //src/test/shell/bazel/android:all or +# build the Android sample app in //examples/android/java/bazel:hello_world +# +# 1. Install an Android SDK and NDK from https://developer.android.com +# 2. Set the $ANDROID_HOME and $ANDROID_NDK_HOME environment variables +# 3. Uncomment the two lines below +# +# android_sdk_repository(name = "androidsdk") +# android_ndk_repository(name = "androidndk") # In order to run //src/test/shell/bazel:maven_skylark_test, follow the # instructions above for the Android integration tests and uncomment the -- cgit v1.2.3