Skip to content

Commit

Permalink
[ButtonBar, NavigationBar] Add BUILD file for kokoro (#2598)
Browse files Browse the repository at this point in the history
* [ButtonBar, NavigationBar] Add BUILD file for kokoro

ButtonBar ColorThemer depends on NavigationBar
NavigationBar depends on ButtonBar
  • Loading branch information
Robert Moore committed Dec 11, 2017
1 parent fb90cb8 commit 5879c18
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 4 deletions.
97 changes: 97 additions & 0 deletions components/ButtonBar/BUILD
@@ -0,0 +1,97 @@
# Copyright 2017-present The Material Components for iOS Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//:material_components_ios.bzl",
"mdc_public_objc_library",
"mdc_objc_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library")

licenses(["notice"]) # Apache 2.0

mdc_public_objc_library(
name = "ButtonBar",
sdk_frameworks = [
"QuartzCore",
"UIKit",
],
deps = [
"//components/Buttons",
"@material_internationalization_ios//:MDFInternationalization",
],
)

mdc_objc_library(
name = "ColorThemer",
srcs = native.glob(["src/ColorThemer/*.m"]),
hdrs = native.glob(["src/ColorThemer/*.h"]),
includes = ["src/ColorThemer"],
sdk_frameworks = [
"UIKit",
],
deps = [
":ButtonBar",
"//components/NavigationBar",
"//components/Themes",
],
visibility = ["//visibility:public"],
)

mdc_objc_library(
name = "private",
hdrs = native.glob(["src/private/*.h"]),
includes = ["src/private"],
visibility = ["//visibility:private"],
)

mdc_objc_library(
name = "unit_test_sources",
testonly = 1,
srcs = native.glob([
"tests/unit/*.m",
"tests/unit/*.h",
]),
sdk_frameworks = [
"UIKit",
"XCTest",
],
deps = [
":ButtonBar",
":ColorThemer",
":private",
],
visibility = ["//visibility:private"],
)

swift_library(
name = "unit_test_swift_sources",
srcs = native.glob(["tests/unit/*.swift"]),
deps = [
":ButtonBar",
":ColorThemer",
":private",
],
visibility = ["//visibility:private"],
)

ios_unit_test(
name = "unit_tests",
deps = [
":unit_test_sources",
":unit_test_swift_sources",
],
minimum_os_version = "8.0",
visibility = ["//visibility:private"],
)
3 changes: 2 additions & 1 deletion components/ButtonBar/tests/unit/ButtonBarIssue328Tests.swift
Expand Up @@ -15,7 +15,8 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialButtonBar
import MaterialComponents.MaterialButtons

// Tests confirming that the Button Bar button ink configuration is:
//
Expand Down
3 changes: 2 additions & 1 deletion components/ButtonBar/tests/unit/ButtonBarIssue370Tests.swift
Expand Up @@ -15,7 +15,8 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialButtonBar
import MaterialComponents.MaterialButtons

// Tests confirming that the Button Bar respects UI appearance for bar button item
// titleTextAttributes on iOS 9 and above.
Expand Down
3 changes: 2 additions & 1 deletion components/ButtonBar/tests/unit/ButtonBarIssue516Tests.swift
Expand Up @@ -15,7 +15,8 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialButtonBar
import MaterialComponents.MaterialButtons

// Tests confirming that the Button Bar lays its buttons according to the layout position:
//
Expand Down
87 changes: 87 additions & 0 deletions components/NavigationBar/BUILD
@@ -0,0 +1,87 @@
# Copyright 2017-present The Material Components for iOS Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//:material_components_ios.bzl",
"mdc_public_objc_library",
"mdc_objc_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library")

licenses(["notice"]) # Apache 2.0

mdc_public_objc_library(
name = "NavigationBar",
sdk_frameworks = [
"CoreGraphics",
],
deps = [
"//components/ButtonBar",
"//components/Typography",
"//components/private/Math",
"@material_internationalization_ios//:MDFInternationalization",
"@material_text_accessibility_ios//:MDFTextAccessibility",
],
)

mdc_objc_library(
name = "ColorThemer",
srcs = native.glob(["src/ColorThemer/*.m"]),
hdrs = native.glob(["src/ColorThemer/*.h"]),
includes = ["src/ColorThemer"],
deps = [
":NavigationBar",
"//components/Themes",
],
visibility = ["//visibility:public"],
)

mdc_objc_library(
name = "unit_test_sources",
testonly = 1,
srcs = native.glob([
"tests/unit/*.m",
"tests/unit/*.h"
]),
sdk_frameworks = [
"UIKit",
"XCTest",
],
deps = [
":NavigationBar",
":ColorThemer",
"@material_text_accessibility_ios//:MDFTextAccessibility",
],
visibility = ["//visibility:private"],
)

swift_library(
name = "unit_test_swift_sources",
srcs = native.glob(["tests/unit/*.swift"]),
deps = [
":NavigationBar",
":ColorThemer",
],
visibility = ["//visibility:private"],
)

ios_unit_test(
name = "unit_tests",
deps = [
":unit_test_sources",
":unit_test_swift_sources",
],
minimum_os_version = "8.0",
visibility = ["//visibility:private"],
)
Expand Up @@ -15,7 +15,8 @@
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialNavigationBar

import MDFTextAccessibility

// Tests confirming that the Navigation Bar Accessibility Mutator correctly changes title font
Expand Down

0 comments on commit 5879c18

Please sign in to comment.