Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 1 | """Template for the build file used in android_sdk_repository.""" |
| 2 | # Copyright 2016 The Bazel Authors. All rights reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Yun Peng | c924cf6 | 2018-01-12 09:13:10 -0800 | [diff] [blame] | 16 | def create_config_setting_rule(): |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 17 | """Create config_setting rule for windows. |
Laszlo Csomor | fe037f3 | 2017-06-28 10:51:26 +0200 | [diff] [blame] | 18 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 19 | These represent the matching --host_cpu values. |
| 20 | """ |
| 21 | name = "windows" |
| 22 | if not native.existing_rule(name): |
| 23 | native.config_setting( |
| 24 | name = name, |
| 25 | values = {"host_cpu": "x64_" + name}, |
| 26 | ) |
Laszlo Csomor | fe037f3 | 2017-06-28 10:51:26 +0200 | [diff] [blame] | 27 | |
Alex Humesky | 9a21e20 | 2016-05-06 23:13:39 +0000 | [diff] [blame] | 28 | def create_android_sdk_rules( |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 29 | name, |
| 30 | build_tools_version, |
| 31 | build_tools_directory, |
| 32 | api_levels, |
| 33 | default_api_level): |
| 34 | """Generate android_sdk rules for the API levels in the Android SDK. |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 35 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 36 | Args: |
| 37 | name: string, the name of the repository being generated. |
| 38 | build_tools_version: string, the version of Android's build tools to use. |
| 39 | build_tools_directory: string, the directory name of the build tools in |
| 40 | sdk's build-tools directory. |
| 41 | api_levels: list of ints, the API levels from which to get android.jar |
| 42 | et al. and create android_sdk rules. |
| 43 | default_api_level: int, the API level to alias the default sdk to if |
| 44 | --android_sdk is not specified on the command line. |
| 45 | """ |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 46 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 47 | create_config_setting_rule() |
Laszlo Csomor | fe037f3 | 2017-06-28 10:51:26 +0200 | [diff] [blame] | 48 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 49 | windows_only_files = [ |
| 50 | "build-tools/%s/aapt.exe" % build_tools_directory, |
| 51 | "build-tools/%s/aidl.exe" % build_tools_directory, |
| 52 | "build-tools/%s/zipalign.exe" % build_tools_directory, |
| 53 | "platform-tools/adb.exe", |
| 54 | ] + native.glob(["build-tools/%s/aapt2.exe" % build_tools_directory]) |
ajmichael | 95ce534 | 2017-09-26 11:39:52 -0400 | [diff] [blame] | 55 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 56 | linux_only_files = [ |
| 57 | "build-tools/%s/aapt" % build_tools_directory, |
| 58 | "build-tools/%s/aidl" % build_tools_directory, |
| 59 | "build-tools/%s/zipalign" % build_tools_directory, |
| 60 | "platform-tools/adb", |
| 61 | ] + native.glob( |
| 62 | ["extras", "build-tools/%s/aapt2" % build_tools_directory], |
| 63 | exclude_directories = 0, |
| 64 | ) |
ajmichael | 95ce534 | 2017-09-26 11:39:52 -0400 | [diff] [blame] | 65 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 66 | # This filegroup is used to pass the minimal contents of the SDK to the |
| 67 | # Android integration tests. Note that in order to work on Windows, we cannot |
| 68 | # include directories and must keep the size small. |
| 69 | native.filegroup( |
| 70 | name = "files", |
| 71 | srcs = [ |
| 72 | "build-tools/%s/lib/apksigner.jar" % build_tools_directory, |
| 73 | "build-tools/%s/lib/dx.jar" % build_tools_directory, |
| 74 | "build-tools/%s/mainDexClasses.rules" % build_tools_directory, |
| 75 | ] + [ |
| 76 | "platforms/android-%d/%s" % (api_level, filename) |
| 77 | for api_level in api_levels |
| 78 | for filename in ["android.jar", "framework.aidl"] |
| 79 | ] + select({ |
| 80 | ":windows": windows_only_files, |
| 81 | "//conditions:default": linux_only_files, |
Laszlo Csomor | fe037f3 | 2017-06-28 10:51:26 +0200 | [diff] [blame] | 82 | }), |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 83 | ) |
| 84 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 85 | for api_level in api_levels: |
| 86 | if api_level >= 23: |
| 87 | # Android 23 removed most of org.apache.http from android.jar and moved it |
| 88 | # to a separate jar. |
| 89 | native.java_import( |
| 90 | name = "org_apache_http_legacy-%d" % api_level, |
| 91 | jars = ["platforms/android-%d/optional/org.apache.http.legacy.jar" % api_level], |
| 92 | ) |
Adam Michael | 43b1d20 | 2017-01-11 23:37:51 +0000 | [diff] [blame] | 93 | |
Googler | db461d0 | 2018-06-21 16:32:38 -0700 | [diff] [blame] | 94 | if api_level >= 28: |
| 95 | # Android 28 removed most of android.test from android.jar and moved it |
| 96 | # to separate jars. |
| 97 | native.java_import( |
| 98 | name = "legacy_test-%d" % api_level, |
| 99 | jars = [ |
| 100 | "platforms/android-%d/optional/android.test.base.jar" % api_level, |
| 101 | "platforms/android-%d/optional/android.test.mock.jar" % api_level, |
| 102 | "platforms/android-%d/optional/android.test.runner.jar" % api_level, |
| 103 | ], |
Googler | 37663e3 | 2018-10-08 13:26:56 -0700 | [diff] [blame] | 104 | neverlink = 1, |
Googler | db461d0 | 2018-06-21 16:32:38 -0700 | [diff] [blame] | 105 | ) |
| 106 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 107 | native.android_sdk( |
| 108 | name = "sdk-%d" % api_level, |
| 109 | build_tools_version = build_tools_version, |
iirina | b2af5ea | 2019-05-16 05:23:38 -0700 | [diff] [blame] | 110 | proguard = "@bazel_tools//tools/jdk:proguard", |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 111 | aapt = select({ |
| 112 | ":windows": "build-tools/%s/aapt.exe" % build_tools_directory, |
| 113 | "//conditions:default": ":aapt_binary", |
| 114 | }), |
| 115 | aapt2 = select({ |
| 116 | ":windows": "build-tools/%s/aapt2.exe" % build_tools_directory, |
| 117 | "//conditions:default": ":aapt2_binary", |
| 118 | }), |
| 119 | dx = ":dx_binary", |
| 120 | main_dex_list_creator = ":main_dex_list_creator", |
| 121 | adb = select({ |
| 122 | ":windows": "platform-tools/adb.exe", |
| 123 | "//conditions:default": "platform-tools/adb", |
| 124 | }), |
| 125 | framework_aidl = "platforms/android-%d/framework.aidl" % api_level, |
| 126 | aidl = select({ |
| 127 | ":windows": "build-tools/%s/aidl.exe" % build_tools_directory, |
| 128 | "//conditions:default": ":aidl_binary", |
| 129 | }), |
| 130 | android_jar = "platforms/android-%d/android.jar" % api_level, |
| 131 | shrinked_android_jar = "platforms/android-%d/android.jar" % api_level, |
| 132 | main_dex_classes = "build-tools/%s/mainDexClasses.rules" % build_tools_directory, |
| 133 | apksigner = ":apksigner", |
| 134 | zipalign = select({ |
| 135 | ":windows": "build-tools/%s/zipalign.exe" % build_tools_directory, |
| 136 | "//conditions:default": ":zipalign_binary", |
| 137 | }), |
ahumesky | a52e65a | 2019-07-11 14:25:11 -0700 | [diff] [blame] | 138 | # See https://github.com/bazelbuild/bazel/issues/8757 |
| 139 | tags = ["__ANDROID_RULES_MIGRATION__"], |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 140 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 141 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 142 | native.alias( |
| 143 | name = "org_apache_http_legacy", |
| 144 | actual = ":org_apache_http_legacy-%d" % default_api_level, |
Philipp Wollermann | a5afe95 | 2016-06-21 14:58:09 +0000 | [diff] [blame] | 145 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 146 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 147 | native.alias( |
| 148 | name = "sdk", |
| 149 | actual = ":sdk-%d" % default_api_level, |
| 150 | ) |
| 151 | |
| 152 | native.java_binary( |
| 153 | name = "apksigner", |
| 154 | main_class = "com.android.apksigner.ApkSignerTool", |
| 155 | runtime_deps = ["build-tools/%s/lib/apksigner.jar" % build_tools_directory], |
| 156 | ) |
| 157 | |
| 158 | native.filegroup( |
| 159 | name = "build_tools_libs", |
| 160 | srcs = native.glob([ |
| 161 | "build-tools/%s/lib/**" % build_tools_directory, |
| 162 | # Build tools version 24.0.0 added a lib64 folder. |
| 163 | "build-tools/%s/lib64/**" % build_tools_directory, |
| 164 | ]), |
| 165 | ) |
| 166 | |
| 167 | for tool in ["aapt", "aapt2", "aidl", "zipalign"]: |
| 168 | native.genrule( |
| 169 | name = tool + "_runner", |
| 170 | outs = [tool + "_runner.sh"], |
| 171 | srcs = [], |
| 172 | cmd = "\n".join([ |
| 173 | "cat > $@ << 'EOF'", |
| 174 | "#!/bin/bash", |
| 175 | "set -eu", |
| 176 | # The tools under build-tools/VERSION require the libraries under |
| 177 | # build-tools/VERSION/lib, so we can't simply depend on them as a |
| 178 | # file like we do with aapt. |
| 179 | # On Windows however we can use these binaries directly because |
| 180 | # there's no runfiles support so Bazel just creates a junction to |
| 181 | # {SDK}/build-tools. |
| 182 | "SDK=$${0}.runfiles/%s" % name, |
| 183 | # If $${SDK} is not a directory, it means that this tool is running |
| 184 | # from a runfiles directory, in the case of |
| 185 | # android_instrumentation_test. Hence, use the androidsdk |
| 186 | # that's already present in the runfiles of the current context. |
| 187 | "if [[ ! -d $${SDK} ]] ; then", |
| 188 | " SDK=$$(pwd)/../%s" % name, |
| 189 | "fi", |
| 190 | "exec $${SDK}/build-tools/%s/%s $$*" % (build_tools_directory, tool), |
| 191 | "EOF\n", |
| 192 | ]), |
| 193 | ) |
| 194 | |
| 195 | native.sh_binary( |
| 196 | name = tool + "_binary", |
| 197 | srcs = [tool + "_runner.sh"], |
| 198 | data = [ |
| 199 | ":build_tools_libs", |
| 200 | "build-tools/%s/%s" % (build_tools_directory, tool), |
| 201 | ], |
| 202 | ) |
| 203 | |
Philipp Wollermann | a5afe95 | 2016-06-21 14:58:09 +0000 | [diff] [blame] | 204 | native.sh_binary( |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 205 | name = "fail", |
| 206 | srcs = select({ |
| 207 | ":windows": [":generate_fail_cmd"], |
| 208 | "//conditions:default": [":generate_fail_sh"], |
| 209 | }), |
Philipp Wollermann | a5afe95 | 2016-06-21 14:58:09 +0000 | [diff] [blame] | 210 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 211 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 212 | native.genrule( |
| 213 | name = "generate_fail_sh", |
| 214 | executable = 1, |
| 215 | outs = ["fail.sh"], |
| 216 | cmd = "echo -e '#!/bin/bash\\nexit 1' >> $@; chmod +x $@", |
| 217 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 218 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 219 | native.genrule( |
| 220 | name = "generate_fail_cmd", |
| 221 | executable = 1, |
| 222 | outs = ["fail.cmd"], |
| 223 | cmd = "echo @exit /b 1 > $@", |
| 224 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 225 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 226 | native.genrule( |
| 227 | name = "main_dex_list_creator_source", |
| 228 | srcs = [], |
| 229 | outs = ["main_dex_list_creator.sh"], |
| 230 | cmd = "\n".join([ |
| 231 | "cat > $@ <<'EOF'", |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 232 | "#!/bin/bash", |
| 233 | "", |
| 234 | "MAIN_DEX_LIST=$$1", |
| 235 | "STRIPPED_JAR=$$2", |
| 236 | "JAR=$$3", |
| 237 | "" + |
ajmichael | 441dc76 | 2018-02-05 08:33:22 -0800 | [diff] [blame] | 238 | "JAVA_BINARY=$$0.runfiles/%s/main_dex_list_creator_java" % name, |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 239 | "$$JAVA_BINARY $$STRIPPED_JAR $$JAR > $$MAIN_DEX_LIST", |
| 240 | "exit $$?", |
| 241 | "", |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 242 | "EOF\n", |
| 243 | ]), |
| 244 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 245 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 246 | native.sh_binary( |
| 247 | name = "main_dex_list_creator", |
| 248 | srcs = ["main_dex_list_creator.sh"], |
| 249 | data = [":main_dex_list_creator_java"], |
| 250 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 251 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 252 | native.java_binary( |
| 253 | name = "main_dex_list_creator_java", |
| 254 | main_class = "com.android.multidex.ClassReferenceListBuilder", |
| 255 | runtime_deps = [":dx_jar_import"], |
| 256 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 257 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 258 | native.java_binary( |
| 259 | name = "dx_binary", |
| 260 | main_class = "com.android.dx.command.Main", |
| 261 | runtime_deps = [":dx_jar_import"], |
| 262 | ) |
Michael Staib | ffec352 | 2016-03-25 00:24:22 +0000 | [diff] [blame] | 263 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 264 | native.java_import( |
| 265 | name = "dx_jar_import", |
| 266 | jars = ["build-tools/%s/lib/dx.jar" % build_tools_directory], |
| 267 | ) |
ajmichael | 8d876cf | 2017-04-12 01:34:08 +0000 | [diff] [blame] | 268 | |
| 269 | TAGDIR_TO_TAG_MAP = { |
Jingwen Chen | ebfd3bc | 2019-06-14 13:45:01 -0700 | [diff] [blame] | 270 | "google_apis_playstore": "playstore", |
ajmichael | 8d876cf | 2017-04-12 01:34:08 +0000 | [diff] [blame] | 271 | "google_apis": "google", |
| 272 | "default": "android", |
| 273 | "android-tv": "tv", |
| 274 | "android-wear": "wear", |
| 275 | } |
| 276 | |
ajmichael | 8d876cf | 2017-04-12 01:34:08 +0000 | [diff] [blame] | 277 | ARCHDIR_TO_ARCH_MAP = { |
| 278 | "x86": "x86", |
| 279 | "armeabi-v7a": "arm", |
| 280 | } |
| 281 | |
ajmichael | 8d876cf | 2017-04-12 01:34:08 +0000 | [diff] [blame] | 282 | def create_system_images_filegroups(system_image_dirs): |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 283 | """Generate filegroups for the system images in the Android SDK. |
Adam Michael | ee9a300 | 2017-02-01 18:15:45 +0000 | [diff] [blame] | 284 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 285 | Args: |
| 286 | system_image_dirs: list of strings, the directories containing system image |
| 287 | files to be used to create android_device rules. |
| 288 | """ |
Adam Michael | ee9a300 | 2017-02-01 18:15:45 +0000 | [diff] [blame] | 289 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 290 | # These images will need to be updated as Android releases new system images. |
| 291 | # We are intentionally not adding future releases because there is no |
| 292 | # guarantee that they will work out of the box. Supported system images should |
| 293 | # be added here once they have been confirmed to work with the Bazel Android |
| 294 | # testing infrastructure. |
| 295 | system_images = [ |
| 296 | (tag, str(api), arch) |
| 297 | for tag in ["android", "google"] |
Jingwen Chen | ebfd3bc | 2019-06-14 13:45:01 -0700 | [diff] [blame] | 298 | for api in [10] + list(range(15, 20)) + list(range(21, 30)) |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 299 | for arch in ("x86", "arm") |
Jingwen Chen | ebfd3bc | 2019-06-14 13:45:01 -0700 | [diff] [blame] | 300 | ] + [ |
| 301 | ("playstore", str(api), "x86") |
| 302 | for api in list(range(24, 30)) |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 303 | ] |
| 304 | tv_images = [ |
Jingwen Chen | ebfd3bc | 2019-06-14 13:45:01 -0700 | [diff] [blame] | 305 | ("tv", str(api), "x86") |
| 306 | for api in range(21, 30) |
| 307 | ] + [ |
| 308 | ("tv", "21", "arm"), |
| 309 | ("tv", "23", "arm"), |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 310 | ] |
| 311 | wear_images = [ |
| 312 | ("wear", str(api), "x86") |
Jingwen Chen | ebfd3bc | 2019-06-14 13:45:01 -0700 | [diff] [blame] | 313 | for api in [23, 25, 26, 28] |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 314 | ] + [ |
| 315 | ("wear", str(api), "arm") |
Jingwen Chen | ebfd3bc | 2019-06-14 13:45:01 -0700 | [diff] [blame] | 316 | for api in [23, 25] |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 317 | ] |
| 318 | supported_system_images = system_images + tv_images + wear_images |
ajmichael | 8d876cf | 2017-04-12 01:34:08 +0000 | [diff] [blame] | 319 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 320 | installed_system_images_dirs = {} |
| 321 | for system_image_dir in system_image_dirs: |
| 322 | apidir, tagdir, archdir = system_image_dir.split("/")[1:] |
| 323 | if "-" not in apidir: |
| 324 | continue |
| 325 | api = apidir.split("-")[1] # "android-24" --> "24", "android-O" --> "O" |
| 326 | if tagdir not in TAGDIR_TO_TAG_MAP: |
| 327 | continue |
| 328 | tag = TAGDIR_TO_TAG_MAP[tagdir] |
| 329 | if archdir not in ARCHDIR_TO_ARCH_MAP: |
| 330 | continue |
| 331 | arch = ARCHDIR_TO_ARCH_MAP[archdir] |
| 332 | if (tag, api, arch) in supported_system_images: |
| 333 | name = "emulator_images_%s_%s_%s" % (tag, api, arch) |
| 334 | installed_system_images_dirs[name] = system_image_dir |
| 335 | else: |
| 336 | # TODO(bazel-team): If the user has an unsupported system image installed, |
| 337 | # should we print a warning? This includes all 64-bit system-images. |
| 338 | pass |
Adam Michael | ee9a300 | 2017-02-01 18:15:45 +0000 | [diff] [blame] | 339 | |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 340 | for (tag, api, arch) in supported_system_images: |
| 341 | name = "emulator_images_%s_%s_%s" % (tag, api, arch) |
| 342 | if name in installed_system_images_dirs: |
| 343 | system_image_dir = installed_system_images_dirs[name] |
| 344 | |
| 345 | # For supported system images that exist in /sdk/system-images/, we |
| 346 | # create a filegroup with their contents. |
| 347 | native.filegroup( |
| 348 | name = name, |
| 349 | srcs = native.glob([ |
| 350 | "%s/**" % system_image_dir, |
| 351 | ]), |
| 352 | ) |
| 353 | native.filegroup( |
| 354 | name = "%s_qemu2_extra" % name, |
| 355 | srcs = native.glob(["%s/kernel-ranchu" % system_image_dir]), |
| 356 | ) |
| 357 | else: |
| 358 | # For supported system images that are not installed in the SDK, we |
| 359 | # create a "poison pill" genrule to display a helpful error message to |
| 360 | # a user who attempts to run a test against an android_device that |
| 361 | # they don't have the system image for installed. |
| 362 | native.genrule( |
| 363 | name = name, |
| 364 | outs = [ |
| 365 | # Necessary so that the build doesn't fail in analysis because |
| 366 | # android_device expects a file named source.properties. |
| 367 | "poison_pill_for_%s/source.properties" % name, |
| 368 | ], |
| 369 | cmd = """echo \ |
ajmichael | 8d876cf | 2017-04-12 01:34:08 +0000 | [diff] [blame] | 370 | This rule requires that the Android SDK used by Bazel has the \ |
| 371 | following system image installed: %s. Please install this system \ |
| 372 | image through the Android SDK Manager and try again. ; \ |
| 373 | exit 1 |
| 374 | """ % name, |
vladmos | 20a042f | 2018-06-01 04:51:21 -0700 | [diff] [blame] | 375 | ) |
| 376 | native.filegroup( |
| 377 | name = "%s_qemu2_extra" % name, |
| 378 | srcs = [], |
| 379 | ) |