Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
.bazelci/ | 23-Nov-2023 | - | 23 | 14 | ||
rules/ | 23-Nov-2023 | - | 9,056 | 8,012 | ||
test/rules/resources/ | 23-Nov-2023 | - | 5 | 4 | ||
toolchains/ | 23-Nov-2023 | - | 311 | 266 | ||
tools/ | 23-Nov-2023 | - | 112 | 82 | ||
AUTHORS | D | 23-Nov-2023 | 298 | 10 | 7 | |
CODEOWNERS | D | 23-Nov-2023 | 56 | 2 | 1 | |
CONTRIBUTING.md | D | 23-Nov-2023 | 2 KiB | 40 | 34 | |
CONTRIBUTORS | D | 23-Nov-2023 | 643 | 17 | 16 | |
LICENSE | D | 23-Nov-2023 | 11.1 KiB | 203 | 169 | |
METADATA | D | 23-Nov-2023 | 471 | 19 | 17 | |
MODULE_LICENSE_APACHE2 | D | 23-Nov-2023 | 0 | |||
README.md | D | 23-Nov-2023 | 1.8 KiB | 52 | 39 | |
ROADMAP.md | D | 23-Nov-2023 | 2.5 KiB | 72 | 52 | |
WORKSPACE | D | 23-Nov-2023 | 104 | 4 | 2 |
README.md
1# Android support in Bazel 2 3## Disclaimer 4 5NOTE: This branch contains a development preview of the Starlark implementation of Android rules for Bazel. This code is incomplete and may not function as-is. 6 7Bazel 4.0.0 or newer and the following flags are necessary to use these rules: 8``` 9--experimental_enable_android_migration_apis 10--experimental_google_legacy_api 11--incompatible_java_common_parameters 12--android_databinding_use_v3_4_args 13--experimental_android_databinding_v2 14``` 15 16Also, register the Android toolchains in the `WORKSPACE` file with: 17``` 18register_toolchains( 19 "@build_bazel_rules_android//toolchains/android:android_default_toolchain", 20 "@build_bazel_rules_android//toolchains/android_sdk:android_sdk_tools", 21) 22``` 23(Assuming that the Android rules repository in the `WORKSPACE` file is named `build_bazel_rules_android`.) 24 25## Overview 26 27This repository contains the Starlark implementation of Android rules in Bazel. 28 29The rules are being incrementally converted from their native implementations 30in the [Bazel source 31tree](https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/rules/android/). 32 33For the list of Android rules, see the Bazel [documentation](https://docs.bazel.build/versions/master/be/android.html). 34 35## Getting Started 36To use the new Bazel Android rules, add the following to your WORKSPACE file: 37 38 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 39 http_archive( 40 name = "build_bazel_rules_android", 41 urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], 42 sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", 43 strip_prefix = "rules_android-0.1.1", 44 ) 45 46Then, in your BUILD files, import and use the rules: 47 48 load("@build_bazel_rules_android//rules:rules.bzl", "android_library") 49 android_library( 50 ... 51 ) 52