blob: 8568f2439d8d116e120e20b37b109a56481d2578 [file]
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module(
name = "credentio",
version = "0.1.0",
)
# apple_support must come before rules_cc so that its Apple C++ toolchain takes
# precedence on macOS.
bazel_dep(name = "apple_support", version = "2.9.1")
bazel_dep(name = "abseil-cpp", version = "20260526.0")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
bazel_dep(name = "protobuf", version = "36.2")
bazel_dep(name = "rules_cc", version = "0.2.25")
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
bazel_dep(name = "riegeli", version = "0.0.0-20250822-9f2744d")
bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.1")
bazel_dep(name = "boringssl", version = "0.20260813.0")
bazel_dep(name = "tink_cc", version = "2.9.1")
bazel_dep(name = "re2", version = "2025-11-05.bcr.1")
# Add rules_android and its dependencies
bazel_dep(name = "rules_java", version = "9.6.1") # Often needed by rules_android
bazel_dep(name = "bazel_skylib", version = "1.9.0") # Often needed by rules_android
bazel_dep(name = "rules_android", version = "0.7.1")
single_version_override(
module_name = "rules_go",
version = "0.60.0",
)
# Configure Android SDK
remote_android_extensions = use_extension(
"@rules_android//bzlmod_extensions:android_extensions.bzl",
"remote_android_tools_extensions",
)
use_repo(remote_android_extensions, "android_tools")
android_sdk_repository_extension = use_extension("@rules_android//rules/android_sdk_repository:rule.bzl", "android_sdk_repository_extension")
use_repo(android_sdk_repository_extension, "androidsdk")
register_toolchains("@androidsdk//:sdk-toolchain", "@androidsdk//:all")
# libcppbor has no Bazel module or release archive, so it is fetched directly
# from AOSP. It is pinned to a commit and fetched over git rather than via the
# gitiles "+archive" endpoint: that endpoint builds tarballs on demand (it
# returns 503 under load) and its output is not byte-reproducible, so it can
# neither be verified with a sha256 nor cached by Bazel.
git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "libcppbor",
build_file = "@//:external/libcppbor.BUILD",
commit = "ef9626806649d45cd1b5dd692695eae82aff5542",
remote = "https://android.googlesource.com/platform/system/libcppbor",
)
archive_override(
module_name = "boringssl",
patch_strip = 1,
patches = ["@//:external/boringssl_pki_visibility.patch"],
strip_prefix = "boringssl-0.20260813.0",
urls = ["https://github.com/google/boringssl/archive/0.20260813.0.tar.gz"],
)