Skip to content

Commit

Permalink
[FlexibleHeader+UIMetrics] Add BUILD file. (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
jverkoey committed Nov 1, 2017
1 parent 4ef8b6f commit eed0271
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 9 deletions.
6 changes: 6 additions & 0 deletions WORKSPACE
Expand Up @@ -29,3 +29,9 @@ git_repository(
remote = "https://github.com/material-foundation/material-internationalization-ios.git",
commit = "fef1a31313a4a8aa0234cce416e1615c7054cf9d",
)

git_repository(
name = "material_text_accessibility_ios",
remote = "https://github.com/material-foundation/material-text-accessibility-ios.git",
commit = "fd570d71ae0124c75ad5af00e6b8b4b1668d5e40",
)
64 changes: 64 additions & 0 deletions components/FlexibleHeader/BUILD
@@ -0,0 +1,64 @@
# 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:swift.bzl", "swift_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")

licenses(["notice"]) # Apache 2.0

mdc_public_objc_library(
name = "FlexibleHeader",
sdk_frameworks = [
"QuartzCore",
"UIKit",
],
deps = [
"//components/private/Application",
"//components/private/UIMetrics",
"@material_text_accessibility_ios//:MDFTextAccessibility",
],
)

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

mdc_objc_library(
name = "unit_test_sources",
testonly = 1,
srcs = glob(["tests/unit/*.m"]),
hdrs = glob(["tests/unit/*.h"]),
sdk_frameworks = [
"UIKit",
"XCTest",
],
deps = [":FlexibleHeader"],
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,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Tests confirming that the flexible header view's frame correctly reflects the target scroll
// view's position immediately after being registered.
Expand Down
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Tests confirming that the flexible header view is always in front of other views when the
// flexible header view is a subview of its tracking scroll view.
Expand Down
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Tests confirming contract with no tracking scroll view
class FlexibleHeaderNoTrackingScrollViewTests: FlexibleHeaderTrackingScrollViewTests {
Expand Down
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Testing the contract for sizeToFit
class FlexibleHeaderSizeToFitTests: XCTestCase {
Expand Down
Expand Up @@ -15,7 +15,7 @@
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Testing status bar-related functionality.
class FlexibleHeaderStatusBarTests: XCTestCase {
Expand Down
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Tests confirming contract with a tracking scroll view that has scrolled
class FlexibleHeaderTrackingScrollViewDidScroll: XCTestCase {
Expand Down
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Tests confirming contract with a tracking scroll view that isn't scrolling
class FlexibleHeaderTrackingScrollViewTests: XCTestCase, UIScrollViewDelegate {
Expand Down
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Tests confirming that setting the flexible header view's min or max height will bound the
// corresponding value.
Expand Down
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import XCTest
import MaterialComponents
import MaterialComponents.MaterialFlexibleHeader

// Tests verifying contentOffset side effect behavior when changing contentInset.
class ScrollViewContentOffsetSideEffectTests: XCTestCase {
Expand Down
26 changes: 26 additions & 0 deletions components/private/UIMetrics/BUILD
@@ -0,0 +1,26 @@
# 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")
load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")

licenses(["notice"]) # Apache 2.0

mdc_public_objc_library(
name = "UIMetrics",
deps = [
"//components/private/Application",
],
)

0 comments on commit eed0271

Please sign in to comment.