Skip to content

Commit

Permalink
move test_resolve_deps to private variable in scala_test.bzl
Browse files Browse the repository at this point in the history
  • Loading branch information
long-stripe committed Aug 17, 2019
1 parent 609c42f commit 6a30189
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
14 changes: 0 additions & 14 deletions scala/private/common_attributes.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,3 @@ resolve_deps = {
allow_files = False,
),
}

test_resolve_deps = {
"_scala_toolchain": attr.label_list(
default = [
Label(
"//external:io_bazel_rules_scala/dependency/scala/scala_library",
),
Label(
"//external:io_bazel_rules_scala/dependency/scalatest/scalatest",
),
],
allow_files = False,
),
}
17 changes: 15 additions & 2 deletions scala/private/rules/scala_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ load(
"common_attrs",
"implicit_deps",
"launcher_template",
"test_resolve_deps",
)
load("@io_bazel_rules_scala//scala/private:common.bzl", "sanitize_string_for_usage")
load("@io_bazel_rules_scala//scala/private:common_outputs.bzl", "common_outputs")
Expand Down Expand Up @@ -173,13 +172,27 @@ _scala_test_attrs = {
),
}

_test_resolve_deps = {
"_scala_toolchain": attr.label_list(
default = [
Label(
"//external:io_bazel_rules_scala/dependency/scala/scala_library",
),
Label(
"//external:io_bazel_rules_scala/dependency/scalatest/scalatest",
),
],
allow_files = False,
),
}

_scala_test_attrs.update(launcher_template)

_scala_test_attrs.update(implicit_deps)

_scala_test_attrs.update(common_attrs)

_scala_test_attrs.update(test_resolve_deps)
_scala_test_attrs.update(_test_resolve_deps)

scala_test = rule(
attrs = _scala_test_attrs,
Expand Down

0 comments on commit 6a30189

Please sign in to comment.