Skip to content

Commit

Permalink
Allow repositories used by setup to be overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Nov 18, 2020
1 parent b7ffc39 commit 7631f36
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ or environment variables. See the [Coursier
documentation](https://get-coursier.io/docs/other-credentials.html#property-file)
for more information.

`rules_jvm_external_setup` uses a default list of maven repositories to download
`rules_jvm_external`'s own dependencies from. Should you wish to change this,
use the `repositories` parameter:

```python
rules_jvm_external_setup(repositories = ["https://mycorp.com/artifacts"])
```

Next, reference the artifacts in the BUILD file with their versionless label:

```python
Expand Down
14 changes: 8 additions & 6 deletions repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
load("//:defs.bzl", "maven_install")

def rules_jvm_external_deps():
_DEFAULT_REPOSITORIES = [
"https://repo1.maven.org/maven2",
"https://jcenter.bintray.com/",
"https://maven.google.com",
]

def rules_jvm_external_deps(repositories = _DEFAULT_REPOSITORIES):
maven_install(
name = "rules_jvm_external_deps",
artifacts = [
],
maven_install_json = "@rules_jvm_external//:rules_jvm_external_deps_install.json",
repositories = [
"https://repo1.maven.org/maven2",
"https://jcenter.bintray.com/",
"https://maven.google.com",
],
repositories = repositories,
)

0 comments on commit 7631f36

Please sign in to comment.