diff --git a/WORKSPACE b/WORKSPACE index 03c0ef2..b4224a6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,11 +1,34 @@ workspace(name = "robolectric") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "rules_java", + sha256 = "1389206b2208c5f33a05dd96e51715b0855c480c082b7bb4889a8e07fcff536c", + urls = [ + "https://github.com/bazelbuild/rules_java/releases/download/8.5.1/rules_java-8.5.1.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() + load("//bazel:robolectric.bzl", "robolectric_repositories") robolectric_repositories() -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - http_archive( name = "bazel_skylib", sha256 = "9f38886a40548c6e96c106b752f242130ee11aaa068a56ba7e56f4511f33e4f2", @@ -31,29 +54,6 @@ load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains buildifier_prebuilt_register_toolchains() -http_archive( - name = "rules_java", - sha256 = "1389206b2208c5f33a05dd96e51715b0855c480c082b7bb4889a8e07fcff536c", - urls = [ - "https://github.com/bazelbuild/rules_java/releases/download/8.5.1/rules_java-8.5.1.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",