Skip to content

Commit

Permalink
Bump rules_java to 8.6.0 (#122)
Browse files Browse the repository at this point in the history
* rules_java to 8.6.0

* buildifier

* delete http_jar.bzl

* Restore snip in example WORKSPACE
  • Loading branch information
ted-xie authored Dec 3, 2024
1 parent 5b7ff8e commit 5e13bd8
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 205 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use_repo(
"org_robolectric_android_all_instrumented_9_robolectric_4913185_2_i7",
)

bazel_dep(name = "rules_java", version = "7.12.2")
bazel_dep(name = "rules_java", version = "8.6.0")
bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "rules_python", version = "0.37.2")

Expand Down
15 changes: 12 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_java",
sha256 = "a9690bc00c538246880d5c83c233e4deb83fe885f54c21bb445eb8116a180b83",
sha256 = "8475fae7a95463a4fd323a46b0f5601f89863ba019afa358cc9fa1d0e67cdd63",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/7.12.2/rules_java-7.12.2.tar.gz",
"https://github.com/bazelbuild/rules_java/releases/download/8.6.0/rules_java-8.6.0.tar.gz",
],
)

load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains")
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()

load("//bazel:robolectric.bzl", "robolectric_repositories")
Expand Down
200 changes: 0 additions & 200 deletions bazel/java/http_jar.bzl

This file was deleted.

2 changes: 1 addition & 1 deletion bazel/robolectric.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Robolectric repositories
"""

load("//bazel/java:http_jar.bzl", "http_jar")
load("@rules_java//java:http_jar.bzl", "http_jar")

def robolectric_version(version, sha256, url = None):
"""Define a struct representation of an instrumented Robolectric jar.
Expand Down
23 changes: 23 additions & 0 deletions examples/simple/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,29 @@ load("@rules_android//android:rules.bzl", "android_sdk_repository")
android_sdk_repository(name = "androidsdk")

#---SNIP--- Below here is re-used in the workspace snippet published on releases
http_archive(
name = "rules_java",
sha256 = "8475fae7a95463a4fd323a46b0f5601f89863ba019afa358cc9fa1d0e67cdd63",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/8.6.0/rules_java-8.6.0.tar.gz",
],
)

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()

http_archive(
name = "rules_python",
sha256 = "c6fb25d0ba0246f6d5bd820dd0b2e66b339ccc510242fd4956b9a639b548d113",
Expand Down

0 comments on commit 5e13bd8

Please sign in to comment.