Skip to content

Commit 51f6377

Browse files
author
Robert Moore
authored
[BottomSheet] Use Starlark macros. (material-components#8160)
Adds more macro usage to the BUILD file. This makes it easier to perform weekly releases. Part of #8150
1 parent 3c03bd0 commit 51f6377

File tree

1 file changed

+15
-28
lines changed
  • components/BottomSheet

1 file changed

+15
-28
lines changed

components/BottomSheet/BUILD

+15-28
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ load(
2121
"mdc_public_objc_library",
2222
"mdc_snapshot_objc_library",
2323
"mdc_snapshot_test",
24+
"mdc_unit_test_objc_library",
2425
"mdc_unit_test_suite",
26+
"mdc_unit_test_swift_library",
2527
)
2628
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
2729

@@ -31,7 +33,6 @@ mdc_public_objc_library(
3133
name = "BottomSheet",
3234
sdk_frameworks = [
3335
"QuartzCore",
34-
"UIKit",
3536
],
3637
deps = [
3738
"//components/Elevation",
@@ -59,22 +60,6 @@ mdc_extension_objc_library(
5960
],
6061
)
6162

62-
mdc_objc_library(
63-
name = "unit_test_sources",
64-
testonly = 1,
65-
srcs = glob(["tests/unit/*.m"]),
66-
hdrs = glob(["tests/unit/*.h"]),
67-
sdk_frameworks = [
68-
"UIKit",
69-
"XCTest",
70-
],
71-
visibility = ["//visibility:private"],
72-
deps = [
73-
":BottomSheet",
74-
":privateHeaders",
75-
],
76-
)
77-
7863
mdc_examples_objc_library(
7964
name = "ObjcExamples",
8065
deps = [
@@ -101,28 +86,30 @@ mdc_examples_swift_library(
10186
],
10287
)
10388

104-
mdc_unit_test_suite(
105-
name = "unit_tests",
89+
mdc_unit_test_objc_library(
90+
name = "unit_test_sources",
10691
deps = [
107-
":unit_test_sources",
108-
":unit_test_swift_sources",
92+
":BottomSheet",
93+
":privateHeaders",
10994
],
11095
)
11196

112-
swift_library(
97+
mdc_unit_test_swift_library(
11398
name = "unit_test_swift_sources",
114-
srcs = glob(["tests/unit/*.swift"]),
115-
copts = [
116-
"-swift-version",
117-
"4.2",
118-
],
119-
visibility = ["//visibility:private"],
12099
deps = [
121100
":BottomSheet",
122101
":ShapeThemer",
123102
],
124103
)
125104

105+
mdc_unit_test_suite(
106+
name = "unit_tests",
107+
deps = [
108+
":unit_test_sources",
109+
":unit_test_swift_sources",
110+
],
111+
)
112+
126113
mdc_snapshot_objc_library(
127114
name = "snapshot_test_lib",
128115
deps = [

0 commit comments

Comments
 (0)