diff --git a/WORKSPACE b/WORKSPACE index aad8e7b..a0410ae 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,14 +19,3 @@ maven_install( "https://repo1.maven.org/maven2", ], ) - -http_archive( - name = "rules_java", - urls = [ - "https://github.com/bazelbuild/rules_java/releases/download/7.6.1/rules_java-7.6.1.tar.gz", - ], - sha256 = "f8ae9ed3887df02f40de9f4f7ac3873e6dd7a471f9cddf63952538b94b59aeb3", -) -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") -rules_java_dependencies() -rules_java_toolchains() diff --git a/bazel_support/repositories.bzl b/bazel_support/repositories.bzl index 92e17ec..0609de4 100644 --- a/bazel_support/repositories.bzl +++ b/bazel_support/repositories.bzl @@ -34,3 +34,10 @@ def gitquery_dependencies( sha256 = rules_jvm_external_sha, url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % rules_jvm_external_tag, ) + + _maybe( + http_archive, + name = "rules_java", + sha256 = "f8ae9ed3887df02f40de9f4f7ac3873e6dd7a471f9cddf63952538b94b59aeb3", + url = "https://github.com/bazelbuild/rules_java/releases/download/7.6.1/rules_java-7.6.1.tar.gz", + )