1module( 2 name = "bazel_build_rules_android", 3 version = "0.2.0", 4) 5 6bazel_dep(name = "platforms", version = "0.0.5") 7bazel_dep(name = "rules_java", version = "5.3.5") 8rules_java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains") 9use_repo(rules_java_toolchains, "remote_java_tools") 10 11bazel_dep(name = "protobuf", version = "3.19.0", repo_name = "com_google_protobuf") 12bazel_dep(name = "rules_jvm_external", version = "4.5") 13bazel_dep(name = "bazel_skylib", version = "1.0.3") 14 15register_toolchains("//toolchains/android:all") 16register_toolchains("//toolchains/android_sdk:all") 17register_toolchains("//toolchains/emulator:all") 18 19# go-related dependency setup 20bazel_dep(name = "rules_go", version = "0.34.0", repo_name = "io_bazel_rules_go") 21bazel_dep(name = "gazelle", version = "0.28.0") 22go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") 23go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") 24go_deps.from_file(go_mod = "//:go.mod") 25use_repo( 26 go_deps, 27 "org_golang_google_protobuf", 28 "com_github_google_go_cmp", 29 "org_golang_x_sync", 30) 31maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") 32maven.install( 33 name = "rules_android_maven", 34 artifacts = [ 35 "com.android.tools.build:bundletool:1.6.1", 36 ], 37 repositories = [ 38 "https://maven.google.com", 39 "https://repo1.maven.org/maven2", 40 ], 41) 42use_repo( 43 maven, 44 "rules_android_maven" 45) 46 47remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions") 48use_repo(remote_android_extensions, "android_tools", "android_gmaven_r8") 49