Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bazel_tools android usage #1228

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
common --enable_bzlmod=true
common --experimental_google_legacy_api

common:rbe --java_runtime_version=11
common:rbe --tool_java_runtime_version=11
Expand Down
6 changes: 1 addition & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_java", version = "7.2.0")
bazel_dep(name = "rules_python", version = "0.23.1")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_android", version = "0.1.1")
bazel_dep(name = "rules_android", version = "0.5.1")

rules_kotlin_extensions = use_extension("//src/main/starlark/core/repositories:bzlmod_setup.bzl", "rules_kotlin_extensions")
use_repo(
Expand Down Expand Up @@ -42,10 +42,6 @@ register_toolchains("@released_rules_kotlin//kotlin/internal:default_toolchain")
# Back to the regularly scheduled configuration.
register_toolchains("//kotlin/internal:default_toolchain")

# TODO(bencodes) We should be able to remove this once rules_android has rolled out official Bzlmod support
remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

# Development dependencies
# TODO(bencodes) A bunch of these dependencies need to be marked as dev_dependencies but before we can do that
# we need to sort out a few cases around how these rules are consumed in various ways.
Expand Down
6 changes: 1 addition & 5 deletions MODULE.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_java", version = "7.2.0")
bazel_dep(name = "rules_python", version = "0.23.1")
bazel_dep(name = "rules_cc", version = "0.0.8")
bazel_dep(name = "rules_android", version = "0.1.1")
bazel_dep(name = "rules_android", version = "0.5.1")

rules_kotlin_extensions = use_extension(
"//src/main/starlark/core/repositories:bzlmod_setup.bzl",
Expand All @@ -28,8 +28,4 @@ use_repo(

register_toolchains("//kotlin/internal:default_toolchain")

# TODO(bencodes) We should be able to remove this once rules_android has rolled out official Bzlmod support
remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
5 changes: 1 addition & 4 deletions examples/android/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module(name = "android-example")

remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

bazel_dep(name = "rules_android", version = "0.1.1")
bazel_dep(name = "rules_android", version = "0.5.1")
bazel_dep(name = "bazel_skylib", version = "1.2.1")
bazel_dep(name = "rules_robolectric", version = "4.10.3", repo_name = "robolectric")
bazel_dep(name = "rules_java", version = "6.4.0")
Expand Down
4 changes: 1 addition & 3 deletions examples/multiplex/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module(name = "multiplex-example")

remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

bazel_dep(name = "rules_android", version = "0.5.1")
bazel_dep(name = "rules_java", version = "6.4.0")
bazel_dep(name = "rules_kotlin", version = "1.9.5")
bazel_dep(name = "rules_jvm_external", version = "5.3")
Expand Down