Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
bubble up fetch_sources (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Napas (Tian) Udomsak authored Jan 17, 2020
1 parent 5d1e922 commit 5511c27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion scala/private/macros/scala_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ def scala_repositories(
_default_scala_version_jar_shas(),
),
maven_servers = ["https://repo.maven.apache.org/maven2"],
scala_extra_jars = _default_scala_extra_jars()):
scala_extra_jars = _default_scala_extra_jars(),
fetch_sources = False):
(scala_version, scala_version_jar_shas) = scala_version_shas
major_version = _extract_major_version(scala_version)

_new_scala_default_repository(
maven_servers = maven_servers,
scala_version = scala_version,
scala_version_jar_shas = scala_version_jar_shas,
fetch_sources = fetch_sources
)

scala_version_extra_jars = scala_extra_jars[major_version]
Expand All @@ -78,6 +80,7 @@ def scala_repositories(
artifact_sha256 = scala_version_extra_jars["scalatest"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
fetch_sources = fetch_sources,
)
_scala_maven_import_external(
name = "io_bazel_rules_scala_scalactic",
Expand All @@ -88,6 +91,7 @@ def scala_repositories(
artifact_sha256 = scala_version_extra_jars["scalactic"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
fetch_sources = fetch_sources,
)

_scala_maven_import_external(
Expand All @@ -99,6 +103,7 @@ def scala_repositories(
artifact_sha256 = scala_version_extra_jars["scala_xml"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
fetch_sources = fetch_sources,
)

_scala_maven_import_external(
Expand All @@ -111,6 +116,7 @@ def scala_repositories(
artifact_sha256 = scala_version_extra_jars["scala_parser_combinators"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
fetch_sources = fetch_sources,
)

# used by ScalacProcessor
Expand All @@ -120,6 +126,7 @@ def scala_repositories(
artifact_sha256 = "f877d304660ac2a142f3865badfc971dec7ed73c747c7f8d5d2f5139ca736513",
licenses = ["notice"],
server_urls = maven_servers,
fetch_sources = fetch_sources,
)

_scala_maven_import_external(
Expand All @@ -128,6 +135,7 @@ def scala_repositories(
artifact_sha256 = "972139718abc8a4893fa78cba8cf7b2c903f35c97aaf44fa3031b0669948b480",
licenses = ["notice"],
server_urls = maven_servers,
fetch_sources = fetch_sources,
)

if not native.existing_rule("com_google_protobuf"):
Expand Down
2 changes: 1 addition & 1 deletion scala/scala_cross_version.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def new_scala_default_repository(
scala_version,
scala_version_jar_shas,
maven_servers,
fetch_sources=False):
fetch_sources):
_scala_maven_import_external(
name = "io_bazel_rules_scala_scala_library",
artifact = "org.scala-lang:scala-library:{}".format(scala_version),
Expand Down

0 comments on commit 5511c27

Please sign in to comment.