Skip to content

Commit

Permalink
Prepare for 0.6.0
Browse files Browse the repository at this point in the history
Closes #295

COPYBARA_INTEGRATE_REVIEW=#295 from ted-xie:cosmetic_stuff 9622296
PiperOrigin-RevId: 705929914
Change-Id: I77ee4abfa11c6c7c4708d032b59f20bb08174ac1
  • Loading branch information
ted-xie authored and copybara-github committed Dec 13, 2024
1 parent a1e745b commit 8ab67ca
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bcr_test_module:
module_path: examples/basicapp
matrix:
platform: ["ubuntu2004", "macos", "windows"]
bazel: ["7.2.1", "7.4.0", "8.x", "rolling"]
bazel: ["7.4.1", "8.0.0", "rolling"]
tasks:
run_test_module:
name: "Verify build targets with bzlmod"
Expand Down
9 changes: 1 addition & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ use_repo(rules_java_toolchains, "remote_java_tools")
bazel_dep(name = "protobuf", version = "29.0", 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 = "rules_robolectric", version = "4.14.1", repo_name = "robolectric")

# To include PR #123
git_override(
module_name = "rules_robolectric",
commit = "f38b7365361f382ecdad255af69b37413dd48ead",
remote = "https://github.com/robolectric/robolectric-bazel",
)
bazel_dep(name = "rules_robolectric", version = "4.14.1.2", repo_name = "robolectric")

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

Expand Down
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,37 @@ To use the Starlark Bazel Android rules, add the following to your WORKSPACE fil
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_android",
sha256 = "fc6b022e97c2d5893aa3dd01b480f37cd386d82fc7e14edbcba393cd390a244e",
strip_prefix = "rules_android-0.6.0",
url = "https://github.com/bazelbuild/rules_android/releases/download/v0.6.0/rules_android-v0.6.0.tar.gz",
sha256 = "fe3d8c4955857b44019d83d05a0b15c2a0330a6a0aab990575bb397e9570ff1b",
strip_prefix = "rules_android-0.6.0-alpha1",
url = "https://github.com/bazelbuild/rules_android/releases/download/v0.6.0-alpha1/rules_android-v0.6.0-alpha1.tar.gz",
)

# Android rules dependencies
load("@rules_android//:prereqs.bzl", "rules_android_prereqs")
rules_android_prereqs()

##### rules_java setup for rules_android #####
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
rules_java_dependencies()
# note that the following line is what is minimally required from protobuf for the java rules
# consider using the protobuf_deps() public API from @com_google_protobuf//:protobuf_deps.bzl
load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility
proto_bazel_features(name = "proto_bazel_features")
# register toolchains
load("@rules_java//java:repositories.bzl", "rules_java_toolchains")
rules_java_toolchains()

##### rules_jvm_external setup for rules_android #####
load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
rules_jvm_external_deps()
load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
rules_jvm_external_setup()

##### rules_android setup #####
load("@rules_android//:defs.bzl", "rules_android_workspace")
rules_android_workspace()

# Android SDK setup
load("@rules_android//rules:rules.bzl", "android_sdk_repository")
android_sdk_repository(
name = "androidsdk",
Expand Down Expand Up @@ -75,4 +97,4 @@ android_binary(
android_library(
...
)
```
```

0 comments on commit 8ab67ca

Please sign in to comment.