1workspace(name = "android_examples") 2 3# Users of `rules_rust` will commonly be unable to load it 4# using a `local_repository`. Instead, to setup the rules, 5# please see https://bazelbuild.github.io/rules_rust/#setup 6local_repository( 7 name = "rules_rust", 8 path = "../..", 9) 10 11load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains") 12 13rules_rust_dependencies() 14 15rust_register_toolchains( 16 edition = "2018", 17 extra_target_triples = [ 18 "aarch64-linux-android", 19 ], 20) 21 22load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 23 24http_archive( 25 name = "build_bazel_rules_android", 26 sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", 27 strip_prefix = "rules_android-0.1.1", 28 urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], 29) 30 31http_archive( 32 name = "bazelci_rules", 33 sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e", 34 strip_prefix = "bazelci_rules-1.0.0", 35 url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz", 36) 37 38load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig") 39 40# Creates a default toolchain config for RBE. 41# Use this as is if you are using the rbe_ubuntu16_04 container, 42# otherwise refer to RBE docs. 43rbe_preconfig( 44 name = "buildkite_config", 45 toolchain = "ubuntu1804-bazel-java11", 46) 47 48android_sdk_repository( 49 name = "androidsdk", 50) 51 52http_archive( 53 name = "rules_android_ndk", 54 sha256 = "b1a5ddd784e6ed915c2035c0db536a278b5f50c64412128c06877115991391ef", 55 strip_prefix = "rules_android_ndk-877c68ef34c9f3353028bf490d269230c1990483", 56 url = "https://github.com/bazelbuild/rules_android_ndk/archive/877c68ef34c9f3353028bf490d269230c1990483.zip", 57) 58 59load("@rules_android_ndk//:rules.bzl", "android_ndk_repository") 60 61android_ndk_repository( 62 name = "androidndk", 63) 64