• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2025 The Android Open Source Project
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#     https://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
15bazel_dep(name = "rules_android", version = "0.6.0")
16
17android_sdk_repository_extension = use_extension(
18    "@rules_android//rules/android_sdk_repository:rule.bzl",
19    "android_sdk_repository_extension",
20)
21
22# When built using 'tools/bazel', 'ANDROID_HOME' environment variable points
23# to the hermetic Android SDK installation, that should be downloaded first
24# with 'tools/install-build-deps --android'
25android_sdk_repository_extension.configure(
26    api_level = 35,
27    build_tools_version = "35.0.1",
28)
29
30bazel_dep(name = "rules_jvm_external", version = "6.6")
31bazel_dep(name = "rules_android_ndk", version = "0.1.2")
32
33android_ndk_repository_extension = use_extension(
34    "@rules_android_ndk//:extension.bzl",
35    "android_ndk_repository_extension",
36)
37
38# When built using 'tools/bazel', 'ANDROID_NDK_HOME' environment variable points
39# to the hermetic Android NDK installation, that should be downloaded first
40# with 'tools/install-build-deps --android'
41android_ndk_repository_extension.configure(
42    api_level = 26,
43)
44use_repo(android_ndk_repository_extension, "androidndk")
45
46register_toolchains("@androidndk//:all")
47