Skip to content
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
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.0
9.0.0rc3
51 changes: 31 additions & 20 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_java", version = "8.13.0")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_shell", version = "0.1.2")
bazel_dep(name = "rules_java", version = "9.0.3")
bazel_dep(name = "rules_cc", version = "0.2.14")
bazel_dep(name = "rules_shell", version = "0.6.1")

bazel_dep(name = "stardoc", version = "0.7.2", dev_dependency = True)

rules_java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")
use_repo(rules_java_toolchains, "remote_java_tools")

bazel_dep(name = "protobuf", version = "31.1", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_jvm_external", version = "6.6")
bazel_dep(name = "bazel_skylib", version = "1.0.3")
bazel_dep(name = "protobuf", version = "33.0", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_jvm_external", version = "6.7")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "rules_robolectric", version = "4.14.1.2", repo_name = "robolectric")

register_toolchains("//toolchains/android:all")

register_toolchains("//toolchains/android_sdk:all")

# go-related dependency setup
bazel_dep(name = "rules_go", version = "0.51.0-rc2", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.59.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")
bazel_dep(name = "abseil-py", version = "2.1.0", repo_name = "py_absl")
bazel_dep(name = "bazel_worker_api", version = "0.0.4")
bazel_dep(name = "bazel_worker_java", version = "0.0.4")
bazel_dep(name = "bazel_worker_api", version = "0.0.6")
bazel_dep(name = "bazel_worker_java", version = "0.0.6")

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.22.4")
Expand All @@ -46,7 +46,7 @@ use_repo(
)

# python-related dependency setup
bazel_dep(name = "rules_python", version = "0.37.1", repo_name = "rules_python")
bazel_dep(name = "rules_python", version = "1.6.0", repo_name = "rules_python")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
Expand All @@ -55,10 +55,21 @@ python.toolchain(
)

# proto-related dependency setup
bazel_dep(name = "rules_proto", version = "6.0.2", repo_name = "rules_proto")
bazel_dep(name = "rules_proto", version = "7.1.0", repo_name = "rules_proto")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

# Shared maven repository for bazel_worker_java and protobuf dependencies
maven.install(
artifacts = [
"com.google.protobuf:protobuf-java:4.33.0",
"com.google.protobuf:protobuf-java-util:4.33.0",
],
repositories = [
"https://repo1.maven.org/maven2",
],
)

# Maven for android_ide_common need to be separated into their own separate maven_install for now
# due to compatibility issues with newer versions.
maven.install(
Expand All @@ -79,8 +90,8 @@ maven.install(
# These technically aren't needed, but the protobuf version pulled
# in by these older deps has compatibility issues with the newer
# protobuf runtimes.
"com.google.protobuf:protobuf-java:4.31.1",
"com.google.protobuf:protobuf-java-util:4.31.1",
"com.google.protobuf:protobuf-java:4.33.0",
"com.google.protobuf:protobuf-java-util:4.33.0",
],
repositories = [
"https://maven.google.com",
Expand All @@ -89,6 +100,7 @@ maven.install(
use_starlark_android_rules = True,
)
use_repo(maven, "android_ide_common_30_1_3")

maven.install(
name = "rules_android_maven",
aar_import_bzl_label = "@rules_android//rules:rules.bzl",
Expand Down Expand Up @@ -117,8 +129,8 @@ maven.install(
"jakarta.inject:jakarta.inject-api:2.0.1",
"junit:junit:4.13.2",
"com.beust:jcommander:1.82",
"com.google.protobuf:protobuf-java:4.31.1",
"com.google.protobuf:protobuf-java-util:4.31.1",
"com.google.protobuf:protobuf-java:4.33.0",
"com.google.protobuf:protobuf-java-util:4.33.0",
"com.google.code.findbugs:jsr305:3.0.2",
"androidx.databinding:databinding-compiler:8.7.0",
"org.ow2.asm:asm:9.6",
Expand Down Expand Up @@ -160,7 +172,6 @@ maven.install(
# lock_file = "//:rules_android_maven_install.json",
use_starlark_android_rules = True,
)

use_repo(
maven,
"rules_android_maven",
Expand All @@ -177,7 +188,7 @@ bazel_dep(
)
bazel_dep(
name = "cgrindel_bazel_starlib",
version = "0.17.0",
version = "0.18.0",
dev_dependency = True,
)

Expand All @@ -187,7 +198,7 @@ bazel_binaries = use_extension(
dev_dependency = True,
)
bazel_binaries.download(version = "last_green")
use_repo(bazel_binaries, "bazel_binaries")
use_repo(bazel_binaries, "bazel_binaries", "bazel_binaries_bazelisk", "build_bazel_bazel_last_green")

# extension for apksignerextensions
apksig_extension = use_extension("//bzlmod_extensions:apksig.bzl", "apksig_extension")
Expand Down
17 changes: 15 additions & 2 deletions examples/basicapp/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ module(
name = "basicapp",
)

bazel_dep(name = "rules_java", version = "8.12.0")
bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "rules_java", version = "9.0.3")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "rules_jvm_external", version = "6.7")

bazel_dep(
name = "rules_android",
Expand All @@ -19,6 +20,18 @@ local_path_override(
path = "../../",
)

# Shared maven repository for bazel_worker_java and protobuf dependencies
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"com.google.protobuf:protobuf-java:4.33.0",
"com.google.protobuf:protobuf-java-util:4.33.0",
],
repositories = [
"https://repo1.maven.org/maven2",
],
)

remote_android_extensions = use_extension(
"@rules_android//bzlmod_extensions:android_extensions.bzl",
"remote_android_tools_extensions")
Expand Down
72 changes: 36 additions & 36 deletions prereqs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ def rules_android_prereqs(dev_mode = False):
http_archive,
name = "rules_java",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/8.13.0/rules_java-8.13.0.tar.gz",
"https://github.com/bazelbuild/rules_java/releases/download/9.0.3/rules_java-9.0.3.tar.gz",
],
sha256 = "b6c6d92ca9dbb77de31fb6c6a794d20427072663ce41c2b047902ffcc123e3ef",
sha256 = "865b3d334bd0f769587737447410d8042d6a95134cc45be5380805fdbacd7152",
)

maybe(
http_archive,
name = "rules_cc",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.1.1/rules_cc-0.1.1.tar.gz"],
sha256 = "712d77868b3152dd618c4d64faaddefcc5965f90f5de6e6dd1d5ddcd0be82d42",
strip_prefix = "rules_cc-0.1.1",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.2.14/rules_cc-0.2.14.tar.gz"],
sha256 = "a2fdfde2ab9b2176bd6a33afca14458039023edb1dd2e73e6823810809df4027",
strip_prefix = "rules_cc-0.2.14",
)

maybe(
Expand All @@ -45,8 +45,8 @@ def rules_android_prereqs(dev_mode = False):
url = "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.31.0.tar",
)

RULES_JVM_EXTERNAL_TAG = "6.6"
RULES_JVM_EXTERNAL_SHA = "3afe5195069bd379373528899c03a3072f568d33bd96fe037bd43b1f590535e7"
RULES_JVM_EXTERNAL_TAG = "6.7"
RULES_JVM_EXTERNAL_SHA = "a1e351607f04fed296ba33c4977d3fe2a615ed50df7896676b67aac993c53c18"
maybe(
http_archive,
name = "rules_jvm_external",
Expand All @@ -55,8 +55,8 @@ def rules_android_prereqs(dev_mode = False):
url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/%s/rules_jvm_external-%s.tar.gz" % (RULES_JVM_EXTERNAL_TAG, RULES_JVM_EXTERNAL_TAG),
)

PROTOBUF_VERSION = "31.1"
PROTOBUF_HASH = "12bfd76d27b9ac3d65c00966901609e020481b9474ef75c7ff4601ac06fa0b82"
PROTOBUF_VERSION = "33.0"
PROTOBUF_HASH = "cbc536064706b628dcfe507bef386ef3e2214d563657612296f1781aa155ee07"
maybe(
http_archive,
name = "com_google_protobuf",
Expand All @@ -77,29 +77,29 @@ def rules_android_prereqs(dev_mode = False):

http_archive(
name = "bazel_skylib",
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
sha256 = "51b5105a760b353773f904d2bbc5e664d0987fbaf22265164de65d43e910d8ac",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.8.1/bazel-skylib-1.8.1.tar.gz",
],
)

maybe(
http_archive,
name = "io_bazel_rules_go",
sha256 = "1101d7e81a6e7f9cee94dd947bed705144bf339257fbec1d73d620df87e58885",
sha256 = "68af54cb97fbdee5e5e8fe8d210d15a518f9d62abfd71620c3eaff3b26a5ff86",
urls = [
"https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.51.0-rc2/rules_go-v0.51.0-rc2.zip",
"https://github.com/bazel-contrib/rules_go/releases/download/v0.51.0-rc2/rules_go-v0.51.0-rc2.zip",
"https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip",
"https://github.com/bazel-contrib/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip",
],
)

maybe(
http_archive,
name = "bazel_gazelle",
sha256 = "a80893292ae1d78eaeedd50d1cab98f242a17e3d5741b1b9fb58b5fd9d2d57bc",
sha256 = "675114d8b433d0a9f54d81171833be96ebc4113115664b791e6f204d58e93446",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.40.0/bazel-gazelle-v0.40.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.40.0/bazel-gazelle-v0.40.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.47.0/bazel-gazelle-v0.47.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.47.0/bazel-gazelle-v0.47.0.tar.gz",
],
)

Expand Down Expand Up @@ -133,21 +133,21 @@ def rules_android_prereqs(dev_mode = False):
maybe(
http_archive,
name = "rules_proto",
sha256 = "0e5c64a2599a6e26c6a03d6162242d231ecc0de219534c38cb4402171def21e8",
strip_prefix = "rules_proto-7.0.2",
url = "https://github.com/bazelbuild/rules_proto/releases/download/7.0.2/rules_proto-7.0.2.tar.gz",
sha256 = "14a225870ab4e91869652cfd69ef2028277fc1dc4910d65d353b62d6e0ae21f4",
strip_prefix = "rules_proto-7.1.0",
url = "https://github.com/bazelbuild/rules_proto/releases/download/7.1.0/rules_proto-7.1.0.tar.gz",
)

maybe(
http_archive,
name = "rules_python",
sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53",
strip_prefix = "rules_python-0.40.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz",
sha256 = "fa7dd2c6b7d63b3585028dd8a90a6cf9db83c33b250959c2ee7b583a6c130e12",
strip_prefix = "rules_python-1.6.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.6.0/rules_python-1.6.0.tar.gz",
)

BAZEL_WORKER_API_VERSION = "0.0.4"
BAZEL_WORKER_API_HASH = "79b30bcdab8cb0dce1523b28ff798067419715f5540a8a446bbccf393e5eb79c"
BAZEL_WORKER_API_VERSION = "0.0.6"
BAZEL_WORKER_API_HASH = "5aac6ae6a23015cc7984492a114dc539effc244ec5ac7f8f6b1539c15fb376eb"
maybe(
http_archive,
name = "bazel_worker_api",
Expand All @@ -171,19 +171,19 @@ def rules_android_prereqs(dev_mode = False):
http_archive,
name = "rules_shell",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_shell/releases/download/v0.3.0/rules_shell-v0.3.0.tar.gz",
"https://github.com/bazelbuild/rules_shell/releases/download/v0.3.0/rules_shell-v0.3.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_shell/releases/download/v0.6.1/rules_shell-v0.6.1.tar.gz",
"https://github.com/bazelbuild/rules_shell/releases/download/v0.6.1/rules_shell-v0.6.1.tar.gz",
],
sha256 = "d8cd4a3a91fc1dc68d4c7d6b655f09def109f7186437e3f50a9b60ab436a0c53",
strip_prefix = "rules_shell-0.3.0",
sha256 = "e6b87c89bd0b27039e3af2c5da01147452f240f75d505f5b6880874f31036307",
strip_prefix = "rules_shell-0.6.1",
)

maybe(
http_archive,
name = "rules_cc",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.16/rules_cc-0.0.16.tar.gz"],
sha256 = "bbf1ae2f83305b7053b11e4467d317a7ba3517a12cef608543c1b1c5bf48a4df",
strip_prefix = "rules_cc-0.0.16",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.2.14/rules_cc-0.2.14.tar.gz"],
sha256 = "a2fdfde2ab9b2176bd6a33afca14458039023edb1dd2e73e6823810809df4027",
strip_prefix = "rules_cc-0.2.14",
)

maybe(
Expand All @@ -198,9 +198,9 @@ def rules_android_prereqs(dev_mode = False):
maybe(
http_archive,
name = "bazel_skylib",
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
sha256 = "51b5105a760b353773f904d2bbc5e664d0987fbaf22265164de65d43e910d8ac",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.8.1/bazel-skylib-1.8.1.tar.gz",
],
)

Expand All @@ -220,8 +220,8 @@ def rules_android_prereqs(dev_mode = False):
maybe(
http_archive,
name = "cgrindel_bazel_starlib",
sha256 = "a8d25340956b429b56302d3fd702bb3df8b3a67db248dd32b3084891ad497964",
sha256 = "dfa423dbf5aac0a5217d3780b295abd3ea1c633d5f9198712b23f0f14f2e8d92",
urls = [
"https://github.com/cgrindel/bazel-starlib/releases/download/v0.17.0/bazel-starlib.v0.17.0.tar.gz",
"https://github.com/cgrindel/bazel-starlib/releases/download/v0.18.0/bazel-starlib.v0.18.0.tar.gz",
],
)
3 changes: 1 addition & 2 deletions src/common/golang/BUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Description:
# Common libraries and utilities.

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(
default_applicable_licenses = ["//:license"],
Expand Down
1 change: 1 addition & 0 deletions src/java/com/example/sampleapp/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Sample app to demonstrate proper rule structuring and mobile-install usage.

load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("//rules:rules.bzl", "android_binary", "android_library")

package(default_visibility = ["//src:__subpackages__"])
Expand Down
3 changes: 1 addition & 2 deletions src/tools/ak/BUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Description:
# Top level package for ak, a "busybox" for various minor build-related tools.

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

package(
default_applicable_licenses = ["//:license"],
Expand Down
1 change: 0 additions & 1 deletion src/tools/ak/bucketize/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Package for bucketize module

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

package(
default_applicable_licenses = ["//:license"],
Expand Down
1 change: 0 additions & 1 deletion src/tools/ak/compile/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Package for compile module

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

package(
default_applicable_licenses = ["//:license"],
Expand Down
1 change: 0 additions & 1 deletion src/tools/ak/extractaar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Package for extractaar module

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

package(
default_applicable_licenses = ["//:license"],
Expand Down
1 change: 0 additions & 1 deletion src/tools/ak/extractresources/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Package for the extractresources tool (formerly resource_extractor.py).

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

package(
default_applicable_licenses = ["//:license"],
Expand Down
1 change: 0 additions & 1 deletion src/tools/ak/finalrjar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Package for final R.jar module

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

package(
default_applicable_licenses = ["//:license"],
Expand Down
Loading