-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathWORKSPACE
More file actions
91 lines (74 loc) · 2.87 KB
/
WORKSPACE
File metadata and controls
91 lines (74 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This is an end-to-end example of how to consume scip-java from an external repository.
workspace(name = "scip_java_example")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
##############
# Bazel stdlib
##############
# To update this version, copy-paste instructions from https://github.com/bazelbuild/bazel-skylib/releases
http_archive(
name = "bazel_skylib",
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
],
)
##############
# scip-java
##############
local_repository(
name = "scip_java",
path = "../..",
)
# Copy and paste this, not the local_repository:
#
# SCIP_JAVA_VERSION="0.8.20"
# http_archive(
# name = "scip_java",
# url = "https://github.com/sourcegraph/scip-java/archive/refs/tags/v{}.zip".format(SCIP_JAVA_VERSION),
# strip_prefix = "scip-java-{}".format(SCIP_JAVA_VERSION),
# )
##########
# Protobuf
##########
# To update this version, copy-paste instructions from https://github.com/bazelbuild/rules_proto/releases
http_archive(
name = "rules_proto",
sha256 = "e017528fd1c91c5a33f15493e3a398181a9e821a804eb7ff5acdd1d2d6c2b18d",
strip_prefix = "rules_proto-4.0.0-3.20.0",
urls = [
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.20.0.tar.gz",
],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
##############
# JVM External
##############
# To update this version, copy-paste instructions from https://github.com/bazelbuild/rules_jvm_external/releases
RULES_JVM_EXTERNAL_TAG = "4.2"
RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca"
http_archive(
name = "rules_jvm_external",
sha256 = RULES_JVM_EXTERNAL_SHA,
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)
load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
rules_jvm_external_deps()
load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
rules_jvm_external_setup()
load("@rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = [
"com.google.protobuf:protobuf-java:3.15.6", # Required dependency by scip-java.
"com.google.protobuf:protobuf-java-util:3.15.6", # Required dependency by scip-java.
# These dependencies are only required for the tests
"com.google.guava:guava:31.0-jre",
"com.google.auto.value:auto-value:1.5.3",
],
repositories = [
"https://repo1.maven.org/maven2",
],
)