Skip to content

Commit 6578b29

Browse files
author
Robert Moore
authored
[Cards] Use Starlark macros. (material-components#8163)
Updates the BUILD file to use as many Starlark macros as possible. Makes releasing easier. Part of #8150
1 parent cab9600 commit 6578b29

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

components/Cards/BUILD

+5-21
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ load(
2222
"mdc_public_objc_library",
2323
"mdc_snapshot_objc_library",
2424
"mdc_snapshot_test",
25+
"mdc_unit_test_objc_library",
2526
"mdc_unit_test_suite",
27+
"mdc_unit_test_swift_library",
2628
)
27-
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
2829

2930
licenses(["notice"]) # Apache 2.0
3031

3132
mdc_public_objc_library(
3233
name = "Cards",
3334
sdk_frameworks = [
3435
"CoreGraphics",
35-
"UIKit",
3636
],
3737
visibility = ["//visibility:public"],
3838
deps = [
@@ -82,17 +82,11 @@ mdc_extension_objc_library(
8282
],
8383
)
8484

85-
swift_library(
85+
mdc_unit_test_swift_library(
8686
name = "unit_test_swift_sources",
87-
srcs = glob([
88-
"tests/unit/*.swift",
87+
extra_srcs = glob([
8988
"tests/unit/Theming/*.swift",
9089
]),
91-
copts = [
92-
"-swift-version",
93-
"4.2",
94-
],
95-
visibility = ["//visibility:private"],
9690
deps = [
9791
":Cards",
9892
":ColorThemer",
@@ -101,18 +95,8 @@ swift_library(
10195
],
10296
)
10397

104-
mdc_objc_library(
98+
mdc_unit_test_objc_library(
10599
name = "unit_test_sources",
106-
testonly = 1,
107-
srcs = native.glob([
108-
"tests/unit/*.m",
109-
"tests/unit/*.h",
110-
]),
111-
sdk_frameworks = [
112-
"UIKit",
113-
"XCTest",
114-
],
115-
visibility = ["//visibility:private"],
116100
deps = [
117101
":Cards",
118102
"//components/private/Icons/icons/ic_info",

0 commit comments

Comments
 (0)