diff --git a/WORKSPACE b/WORKSPACE index af83363c1..15df4ac34 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -13,6 +13,25 @@ http_archive( url = "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib-{}.tar.gz".format(skylib_version, skylib_version), ) +http_archive( + name = "rules_proto", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + ], +) + +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") + +# Declares @com_google_protobuf//:protoc pointing to released binary +# This should stop building protoc during bazel build +# See https://github.com/bazelbuild/rules_proto/pull/36 +rules_proto_dependencies() + +rules_proto_toolchains() + _build_tools_release = "3.3.0" http_archive( diff --git a/examples/testing/scalatest_repositories/WORKSPACE b/examples/testing/scalatest_repositories/WORKSPACE index d5d4a1ae6..10fa0594c 100644 --- a/examples/testing/scalatest_repositories/WORKSPACE +++ b/examples/testing/scalatest_repositories/WORKSPACE @@ -11,6 +11,22 @@ http_archive( url = "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib-{}.tar.gz".format(skylib_version, skylib_version), ) +http_archive( + name = "rules_proto", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + ], +) + +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") + +rules_proto_dependencies() + +rules_proto_toolchains() + local_repository( name = "io_bazel_rules_scala", path = "../../..", diff --git a/examples/testing/specs2_junit_repositories/WORKSPACE b/examples/testing/specs2_junit_repositories/WORKSPACE index db48ab649..d97e03adf 100644 --- a/examples/testing/specs2_junit_repositories/WORKSPACE +++ b/examples/testing/specs2_junit_repositories/WORKSPACE @@ -11,6 +11,22 @@ http_archive( url = "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib-{}.tar.gz".format(skylib_version, skylib_version), ) +http_archive( + name = "rules_proto", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + ], +) + +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") + +rules_proto_dependencies() + +rules_proto_toolchains() + local_repository( name = "io_bazel_rules_scala", path = "../../..", diff --git a/scala/private/macros/scala_repositories.bzl b/scala/private/macros/scala_repositories.bzl index a35fa8f68..ec62c0b36 100644 --- a/scala/private/macros/scala_repositories.bzl +++ b/scala/private/macros/scala_repositories.bzl @@ -40,11 +40,11 @@ def rules_scala_setup(): if not native.existing_rule("rules_proto"): http_archive( name = "rules_proto", - sha256 = "4d421d51f9ecfe9bf96ab23b55c6f2b809cbaf0eea24952683e397decfbd0dd0", - strip_prefix = "rules_proto-f6b8d89b90a7956f6782a4a3609b2f0eee3ce965", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/f6b8d89b90a7956f6782a4a3609b2f0eee3ce965.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/f6b8d89b90a7956f6782a4a3609b2f0eee3ce965.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], ) diff --git a/test_version/WORKSPACE.template b/test_version/WORKSPACE.template index 37044b6e5..2e3d0cc17 100644 --- a/test_version/WORKSPACE.template +++ b/test_version/WORKSPACE.template @@ -11,6 +11,22 @@ http_archive( url = "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib-{}.tar.gz".format(skylib_version, skylib_version), ) +http_archive( + name = "rules_proto", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + ], +) + +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") + +rules_proto_dependencies() + +rules_proto_toolchains() + local_repository( name = "io_bazel_rules_scala", path = "../../" @@ -50,16 +66,3 @@ register_toolchains("@io_bazel_rules_scala//testing:testing_toolchain") load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_unused_deps_toolchains") scala_register_unused_deps_toolchains() - -protobuf_version="3.11.3" -protobuf_version_sha256="cf754718b0aa945b00550ed7962ddc167167bd922b842199eeb6505e6f344852" - -http_archive( - name = "com_google_protobuf", - url = "https://github.com/protocolbuffers/protobuf/archive/v%s.tar.gz" % protobuf_version, - strip_prefix = "protobuf-%s" % protobuf_version, - sha256 = protobuf_version_sha256, -) - -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") -protobuf_deps() diff --git a/third_party/test/proto/WORKSPACE b/third_party/test/proto/WORKSPACE index 354d971f0..52527094b 100644 --- a/third_party/test/proto/WORKSPACE +++ b/third_party/test/proto/WORKSPACE @@ -2,20 +2,21 @@ workspace(name = "proto") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -protobuf_version = "3.11.3" - -protobuf_version_sha256 = "cf754718b0aa945b00550ed7962ddc167167bd922b842199eeb6505e6f344852" - http_archive( - name = "com_google_protobuf", - sha256 = protobuf_version_sha256, - strip_prefix = "protobuf-%s" % protobuf_version, - url = "https://github.com/protocolbuffers/protobuf/archive/v%s.tar.gz" % protobuf_version, + name = "rules_proto", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + ], ) -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") + +rules_proto_dependencies() -protobuf_deps() +rules_proto_toolchains() local_repository( name = "io_bazel_rules_scala",