aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/BUILD
diff options
context:
space:
mode:
authorGravatar ajmichael <ajmichael@google.com>2017-03-30 23:33:30 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2017-03-31 17:12:51 +0200
commit6dd0292fb522f68ea18371107d68934c3f7eee22 (patch)
tree2a53c30181930ca73b19dc9d04f3c8474bdd68cd /src/main/java/com/google/devtools/build/lib/BUILD
parent5d2f57b6f970c1bfae0dcee23a3981cdcf5af45f (diff)
Open source android_device rule.
This rule has an implicit dependency on unified_launcher, which is hosted in an external repository at https://github.com/google/android-testing-support-library and must be set up in the WORKSPACE file with repository name @android_test_support. A future change will introduce an Android tools set-up macro that will create workspace rules for all of the remote Android tools, including unified_launcher. Note that unified_launcher is not supported on Mac or Windows, so Bazel will only be able to successfully build the android_device rule on Linux. Instructions to set up unified_launcher for use with android_device: 1. Install xvfb 2. In your WORKSPACE add ``` android_sdk_repository(name = "androidsdk") # Also set $ANDROID_HOME git_repository( name = "android_test_support", remote = "https://github.com/google/android-testing-support-library", commit = "79725fed7a6884074fb3647a683869e7141ecf64", ) load( "@android_test_support//tools/android/emulator:unified_launcher.bzl", load_unified_launcher_deps = "load_workspace") load_unified_launcher_deps() ``` In your BUILD file, you can create an android_device rule for a system image that you have installed in your Android SDK as: ``` android_device( name = "my_device", cache = 256, default_properties = "@bazel_tools//tools/android/emulator:no_se_linux.properties", horizontal_resolution = 640, vertical_resolution = 800, screen_density = 133, ram = 2048, vm_heap = 256, system_image = "@androidsdk//:android-23_default_x86_files", ) ``` RELNOTES: Introduces experimental android_device rule for configuring and launching Android emulators. PiperOrigin-RevId: 151766489
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/BUILD')
-rw-r--r--src/main/java/com/google/devtools/build/lib/BUILD3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/BUILD b/src/main/java/com/google/devtools/build/lib/BUILD
index adfc1a2c3c..31ec385229 100644
--- a/src/main/java/com/google/devtools/build/lib/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/BUILD
@@ -953,6 +953,9 @@ java_library(
srcs = glob(
["rules/android/*.java"],
),
+ resources = [
+ "rules/android/android_device_stub_template.txt",
+ ],
deps = [
":build-base",
":collect",