xref: /aosp_15_r20/external/bazelbuild-rules_android/android/rules.bzl (revision 9e965d6fece27a77de5377433c2f7e6999b8cc0b)
1# Copyright 2019 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Starlark rules for building Android apps."""
16
17# Don't use relative paths since this file is coppied to //android/rules.bzl.
18
19load(
20    "//rules/aar_import:rule.bzl",
21    _aar_import = "aar_import",
22)
23load(
24    "//rules/android_application:android_application.bzl",
25    _android_application = "android_application",
26)
27load(
28    "//rules:android_binary.bzl",
29    _android_binary = "android_binary",
30)
31load(
32    "//rules/android_library:rule.bzl",
33    _android_library = "android_library_macro",
34)
35load(
36    "//rules/android_local_test:rule.bzl",
37    _android_local_test = "android_local_test",
38)
39load(
40    "//rules:android_ndk_repository.bzl",
41    _android_ndk_repository = "android_ndk_repository",
42)
43load(
44    "//rules/android_sandboxed_sdk:android_sandboxed_sdk.bzl",
45    _android_sandboxed_sdk = "android_sandboxed_sdk",
46)
47load(
48    "//rules/android_sandboxed_sdk:android_sandboxed_sdk_bundle.bzl",
49    _android_sandboxed_sdk_bundle = "android_sandboxed_sdk_bundle",
50)
51load(
52    "//rules:android_sdk.bzl",
53    _android_sdk = "android_sdk",
54)
55load(
56    "//rules/android_sdk_repository:rule.bzl",
57    _android_sdk_repository = "android_sdk_repository",
58)
59load(
60    "//rules:android_tools_defaults_jar.bzl",
61    _android_tools_defaults_jar = "android_tools_defaults_jar",
62)
63load(
64    "//rules/android_sandboxed_sdk:asar_import.bzl",
65    _asar_import = "asar_import",
66)
67
68# Current version. Tools may check this to determine compatibility.
69RULES_ANDROID_VERSION = "0.1.0"
70
71aar_import = _aar_import
72android_application = _android_application
73android_binary = _android_binary
74android_library = _android_library
75android_local_test = _android_local_test
76android_ndk_repository = _android_ndk_repository
77android_sandboxed_sdk = _android_sandboxed_sdk
78android_sandboxed_sdk_bundle = _android_sandboxed_sdk_bundle
79android_sdk = _android_sdk
80android_sdk_repository = _android_sdk_repository
81android_tools_defaults_jar = _android_tools_defaults_jar
82asar_import = _asar_import
83