Skip to content

Commit cab9600

Browse files
author
Robert Moore
authored
[ButtonBar] Use Starlark macros. (material-components#8161)
Adds more Starlark macro usage in the BUILD file. This makes releasing easier. Part of #8150
1 parent 51f6377 commit cab9600

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed

components/ButtonBar/BUILD

+5-20
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ 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
)
2729
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
2830

@@ -90,22 +92,11 @@ mdc_examples_swift_library(
9092
mdc_objc_library(
9193
name = "private",
9294
hdrs = native.glob(["src/private/*.h"]),
93-
includes = ["src/private"],
9495
visibility = ["//visibility:private"],
9596
)
9697

97-
mdc_objc_library(
98+
mdc_unit_test_objc_library(
9899
name = "unit_test_sources",
99-
testonly = 1,
100-
srcs = native.glob([
101-
"tests/unit/*.m",
102-
"tests/unit/*.h",
103-
]),
104-
sdk_frameworks = [
105-
"UIKit",
106-
"XCTest",
107-
],
108-
visibility = ["//visibility:private"],
109100
deps = [
110101
":ButtonBar",
111102
":ColorThemer",
@@ -114,17 +105,11 @@ mdc_objc_library(
114105
],
115106
)
116107

117-
swift_library(
108+
mdc_unit_test_swift_library(
118109
name = "unit_test_swift_sources",
119-
srcs = native.glob([
120-
"tests/unit/*.swift",
110+
extra_srcs = native.glob([
121111
"tests/unit/Theming/*.swift",
122112
]),
123-
copts = [
124-
"-swift-version",
125-
"4.2",
126-
],
127-
visibility = ["//visibility:private"],
128113
deps = [
129114
":Theming",
130115
"//components/Typography",

components/ButtonBar/tests/unit/ButtonBarBuilderTests.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
#import <XCTest/XCTest.h>
16-
#import "MDCAppBarButtonBarBuilder.h"
16+
#import "../../src/private/MDCAppBarButtonBarBuilder.h"
1717
#import "MaterialButtonBar.h"
1818
#import "MaterialButtons.h"
1919

components/ButtonBar/tests/unit/ButtonBarRippleTests.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#import <XCTest/XCTest.h>
1616

17-
#import "MDCAppBarButtonBarBuilder.h"
17+
#import "../../src/private/MDCAppBarButtonBarBuilder.h"
1818
#import "MaterialButtonBar.h"
1919
#import "MaterialInk.h"
2020
#import "MaterialRipple.h"

0 commit comments

Comments
 (0)