forked from bazelbuild/rules_scala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
190 lines (139 loc) · 6.16 KB
/
WORKSPACE
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
workspace(name = "io_bazel_rules_scala")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
skylib_version = "1.0.3"
http_archive(
name = "bazel_skylib",
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
type = "tar.gz",
url = "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib-{}.tar.gz".format(skylib_version, skylib_version),
)
_build_tools_release = "3.5.0"
http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "a02ba93b96a8151b5d8d3466580f6c1f7e77212c4eb181cba53eb2cae7752a23",
strip_prefix = "buildtools-%s" % _build_tools_release,
url = "https://github.com/bazelbuild/buildtools/archive/%s.tar.gz" % _build_tools_release,
)
load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
scala_config()
load("//scala:scala.bzl", "scala_repositories")
scala_repositories(fetch_sources = True)
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()
load("//scala:scala_cross_version.bzl", "default_maven_server_urls")
load("//twitter_scrooge:twitter_scrooge.bzl", "twitter_scrooge")
twitter_scrooge()
load("//jmh:jmh.bzl", "jmh_repositories")
jmh_repositories()
load("//scala_proto:scala_proto.bzl", "scala_proto_repositories")
scala_proto_repositories()
load("//scalatest:scalatest.bzl", "scalatest_repositories")
scalatest_repositories()
load("//specs2:specs2_junit.bzl", "specs2_junit_repositories")
specs2_junit_repositories()
register_toolchains("//testing:testing_toolchain")
load("//scala/scalafmt:scalafmt_repositories.bzl", "scalafmt_default_config", "scalafmt_repositories")
scalafmt_default_config()
scalafmt_repositories()
MAVEN_SERVER_URLS = default_maven_server_urls()
# needed for the cross repo proto test
load("//test/proto_cross_repo_boundary:repo.bzl", "proto_cross_repo_boundary_repository")
proto_cross_repo_boundary_repository()
new_local_repository(
name = "test_new_local_repo",
build_file_content =
"""
filegroup(
name = "data",
srcs = glob(["**/*.txt"]),
visibility = ["//visibility:public"],
)
""",
path = "third_party/test/new_local_repo",
)
local_repository(
name = "strip_resource_external_workspace",
path = "third_party/test/strip_resource_external_workspace",
)
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_unused_deps_toolchains")
scala_register_unused_deps_toolchains()
register_toolchains("@io_bazel_rules_scala//test/proto:scalapb_toolchain")
load("//scala:scala_maven_import_external.bzl", "java_import_external")
# bazel's java_import_external has been altered in rules_scala to be a macro based on jvm_import_external
# in order to allow for other jvm-language imports (e.g. scala_import)
# the 3rd-party dependency below is using the java_import_external macro
# in order to make sure no regression with the original java_import_external
java_import_external(
name = "org_apache_commons_commons_lang_3_5_without_file",
generated_linkable_rule_name = "linkable_org_apache_commons_commons_lang_3_5_without_file",
jar_sha256 = "8ac96fc686512d777fca85e144f196cd7cfe0c0aec23127229497d1a38ff651c",
jar_urls = ["https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar"],
licenses = ["notice"], # Apache 2.0
neverlink = True,
testonly_ = True,
)
## Linting
load("//private:format.bzl", "format_repositories")
format_repositories()
http_archive(
name = "io_bazel_rules_go",
sha256 = "d1ffd055969c8f8d431e2d439813e42326961d0942bdf734d2c95dc30c369566",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.5/rules_go-v0.24.5.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.24.5/rules_go-v0.24.5.tar.gz",
],
)
load(
"@io_bazel_rules_go//go:deps.bzl",
"go_register_toolchains",
"go_rules_dependencies",
)
go_rules_dependencies()
go_register_toolchains()
bazel_toolchains_version = "4.1.0"
http_archive(
name = "bazel_toolchains",
sha256 = "179ec02f809e86abf56356d8898c8bd74069f1bd7c56044050c2cd3d79d0e024",
strip_prefix = "bazel-toolchains-%s" % bazel_toolchains_version,
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/%s/bazel-toolchains-%s.tar.gz" % (bazel_toolchains_version, bazel_toolchains_version),
"https://github.com/bazelbuild/bazel-toolchains/releases/download/%s/bazel-toolchains-%s.tar.gz" % (bazel_toolchains_version, bazel_toolchains_version),
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
# Creates toolchain configuration for remote execution with BuildKite CI
# for rbe_ubuntu1604
rbe_autoconfig(
name = "buildkite_config",
)
load("//third_party/repositories:repositories.bzl", "repositories")
repositories(
fetch_sources = False,
for_artifact_ids = [
# test adding a scala jar:
"com_twitter__scalding_date",
# test of strict deps (scalac plugin UT + E2E)
"com_google_guava_guava_21_0_with_file",
"com_github_jnr_jffi_native",
"org_apache_commons_commons_lang_3_5",
"com_google_guava_guava_21_0",
# test of import external
# scala maven import external decodes maven artifacts to its parts
# (group id, artifact id, packaging, version and classifier). To make sure
# the decoding and then the download url composition are working the artifact example
# must contain all the different parts and sha256s so the downloaded content will be
# validated against it
"org_springframework_spring_core",
"org_springframework_spring_tx",
"org_spire_math_kind_projector",
# For testing that we don't include sources jars to the classpath
"org_typelevel__cats_core",
],
maven_servers = MAVEN_SERVER_URLS,
)