]> source.dussan.org Git - jgit.git/commitdiff
Bazel: Require minimum bazel version 0.17.1 18/130718/2
authorDavid Pursehouse <david.pursehouse@gmail.com>
Wed, 10 Oct 2018 01:53:35 +0000 (10:53 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Wed, 10 Oct 2018 02:39:56 +0000 (11:39 +0900)
Check the bazel version using the checker from bazel_skylib, and
require at least version 0.17.1 which is the minimum version that
does not suffer from the Java API mismatch issue [1].

The implementation is borrowed from the Gerrit project.

[1] https://github.com/bazelbuild/bazel/issues/6027

Change-Id: I224250088a1f5072fcaa3ec81228f4d2cb8cb389
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
WORKSPACE

index 9d723d28e105c5a5c0f2272f904cd6a6a135c666..209550fa59736646edb33540e9de17c932884397 100644 (file)
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1,5 +1,18 @@
 workspace(name = "jgit")
 
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+http_archive(
+    name = "bazel_skylib",
+    sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
+    strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
+    urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
+)
+
+load("@bazel_skylib//:lib.bzl", "versions")
+
+versions.check(minimum_bazel_version = "0.17.1")
+
 load("//tools:bazlets.bzl", "load_bazlets")
 
 load_bazlets(commit = "3afbeab55ece585dbfc7a980bf7214b24ddbbe86")