Skip to content

Commit

Permalink
DSP-1099 Update Bazel maven rules (#1761)
Browse files Browse the repository at this point in the history
  • Loading branch information
subotic committed Dec 10, 2020
1 parent 389feb4 commit a2c9941
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
@@ -1 +1 @@
3.7.0
3.7.1
35 changes: 22 additions & 13 deletions WORKSPACE
Expand Up @@ -13,8 +13,8 @@ http_archive(
)

# download rules_scala repository
rules_scala_version="056d5921d2c595e7ce2d54a627e8bc68ece7e28d" # 16.06.2020
rules_scala_version_sha256="a39010b90ce921fd627c7158d43c16d8bd540e85d339ce9ac975e37213a843d4"
rules_scala_version="8866f55712b30bbb96335cc11bc5ae5aad5cf8d4" # 18.11.2020
rules_scala_version_sha256="cdc13aba7f0f89ae52c9c50394a10f24ac0e18923108598ac9dafce5be6a789a"
http_archive(
name = "io_bazel_rules_scala",
strip_prefix = "rules_scala-%s" % rules_scala_version,
Expand All @@ -23,21 +23,25 @@ http_archive(
sha256 = rules_scala_version_sha256,
)

# Stores Scala version and other configuration
# 2.12 is a default version, other versions can be use by passing them explicitly:
# scala_config(scala_version = "2.11.12")
load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
scala_config(scala_version = "2.12.11")

# register default and our custom scala toolchain
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
scala_register_toolchains()
register_toolchains("//toolchains:dsp_api_scala_toolchain")

# set the default scala version
# needed by rules_scala
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_repositories((
"2.12.11",
{
"scala_compiler": "e901937dbeeae1715b231a7cfcd547a10d5bbf0dfb9d52d2886eae18b4d62ab6",
"scala_library": "dbfe77a3fc7a16c0c7cb6cb2b91fecec5438f2803112a744cb1b187926a138be",
"scala_reflect": "5f9e156aeba45ef2c4d24b303405db259082739015190b3b334811843bd90d6a"
}
))
scala_repositories()

# register the test toolchain for rules_scala
load("@io_bazel_rules_scala//testing:scalatest.bzl", "scalatest_repositories", "scalatest_toolchain")
scalatest_repositories()
scalatest_toolchain()

#
# Download the protobuf repository (needed by go and rules_scala_annex)
Expand Down Expand Up @@ -85,8 +89,8 @@ java_repositories()
# download rules_jvm_external used for maven dependency resolution
# defined in the third_party sub-folder
#
rules_jvm_external_version = "3.2" # 24.02.2020
rules_jvm_external_version_sha256 = "82262ff4223c5fda6fb7ff8bd63db8131b51b413d26eb49e3131037e79e324af"
rules_jvm_external_version = "3.3" # 7.07.2020
rules_jvm_external_version_sha256 = "d85951a92c0908c80bd8551002d66cb23c3434409c814179c0ff026b53544dab"

http_archive(
name = "rules_jvm_external",
Expand Down Expand Up @@ -177,6 +181,11 @@ go_rules_dependencies()

go_register_toolchains()

# legacy variant used by rules_docker. Remove after rules_docker was updated to
# newest rules_python
load("@rules_python//python:pip.bzl", "pip_import", "pip_repositories")
pip_repositories()

#
# Download the rules_docker repository at release v0.14.4
#
Expand Down
17 changes: 17 additions & 0 deletions docs/05-internals/development/third-party.md
Expand Up @@ -19,6 +19,23 @@ Example of a "flattened" Bazel version looks as follows:

To query Bazel for all defined Maven dependencies: `bazel query @maven//:all | sort`

### Manually Fetching Dependencies

The Maven dependencies can be manually fetched with:
```bash
$ bazel fetch @maven//...
```

If there are any problems downloading the Maven dependencies, set the
`RJE_VERBOSE` environment variable to true to print `coursier`'s verbose output:
```bash
$ RJE_VERBOSE=true bazel fetch @maven//...
```

Note: If you are on macOS Big Sur and have the Cisco VPN client installed,
make sure that the packet filters are not active, or they may be a problem
downloading the dependencies.

## Docker Image Versions

The required Docker image versions of `Sipi` and `Fuseki` are defined in the
Expand Down

0 comments on commit a2c9941

Please sign in to comment.