Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Commit 92c9e56

Browse files
author
Jeff Verkoeyen
committed
Merge branch 'release-candidate' into stable
2 parents 7340b22 + 6eff4e0 commit 92c9e56

File tree

10 files changed

+191
-11
lines changed

10 files changed

+191
-11
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
bazel-*
2+
.kokoro-ios-runner
3+
14
# Xcode
25
#
36
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

.kokoro

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2017-present The Material Foundation Authors. All Rights Reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Fail on any error.
18+
set -e
19+
20+
# Display commands to stderr.
21+
set -x
22+
23+
KOKORO_RUNNER_VERSION="v3.*"
24+
25+
fix_bazel_imports() {
26+
if [ -z "$KOKORO_BUILD_NUMBER" ]; then
27+
tests_dir_prefix=""
28+
else
29+
tests_dir_prefix="github/repo/"
30+
fi
31+
32+
rewrite_source() {
33+
find "${stashed_dir}${tests_dir_prefix}tests/unit" -type f -name '*.swift' -exec sed -i '' -E "$1" {} + || true
34+
}
35+
36+
stashed_dir=""
37+
rewrite_source "s/import MDFTextAccessibility/import _MDFTextAccessibility/"
38+
stashed_dir="$(pwd)/"
39+
reset_imports() {
40+
# Undoes our source changes from above.
41+
rewrite_source "s/import _MDFTextAccessibility/import MDFTextAccessibility/"
42+
}
43+
trap reset_imports EXIT
44+
}
45+
46+
if [ ! -d .kokoro-ios-runner ]; then
47+
git clone https://github.com/material-foundation/kokoro-ios-runner.git .kokoro-ios-runner
48+
fi
49+
50+
pushd .kokoro-ios-runner
51+
git fetch > /dev/null
52+
TAG=$(git tag --sort=v:refname -l "$KOKORO_RUNNER_VERSION" | tail -n1)
53+
git checkout "$TAG" > /dev/null
54+
popd
55+
56+
fix_bazel_imports
57+
58+
./.kokoro-ios-runner/bazel.sh test //:UnitTests 8.1.0
59+
60+
echo "Success!"

BUILD

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright 2017-present The Material Foundation Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
load("@bazel_ios_warnings//:strict_warnings_objc_library.bzl", "strict_warnings_objc_library")
16+
load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library")
17+
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
18+
19+
licenses(["notice"]) # Apache 2.0
20+
21+
exports_files(["LICENSE"])
22+
23+
strict_warnings_objc_library(
24+
name = "MDFTextAccessibility",
25+
srcs = glob([
26+
"src/*.m",
27+
"src/private/*.m",
28+
]),
29+
hdrs = glob([
30+
"src/*.h",
31+
"src/private/*.h",
32+
]),
33+
enable_modules = 1,
34+
includes = ["src"],
35+
visibility = ["//visibility:public"],
36+
)
37+
38+
swift_library(
39+
name = "UnitTestsSwiftLib",
40+
srcs = glob([
41+
"tests/unit/*.swift",
42+
]),
43+
resources = glob(["tests/resources/*"]),
44+
deps = [":MDFTextAccessibility"],
45+
visibility = ["//visibility:private"],
46+
)
47+
48+
ios_unit_test(
49+
name = "UnitTests",
50+
deps = [
51+
":UnitTestsSwiftLib"
52+
],
53+
timeout = "short",
54+
visibility = ["//visibility:private"],
55+
)

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 1.2.1
2+
3+
This patch release adds various build system-related files.
4+
5+
## Non-source changes
6+
7+
* [Add missing Info.plist (#21)](https://github.com/material-foundation/material-text-accessibility-ios/commit/fc2a7cbbca2ac40fa6f09f34bf71033adc9d5308) (Louis Romero)
8+
* [Remove obsolete comment (#20)](https://github.com/material-foundation/material-text-accessibility-ios/commit/bac12cbbdacd11c0bb315359ec5373d08fc76fb8) (Brenton Simpson)
9+
* [Add support for kokoro and bazel continuous integration. (#19)](https://github.com/material-foundation/material-text-accessibility-ios/commit/fd570d71ae0124c75ad5af00e6b8b4b1668d5e40) (featherless)
10+
111
## 1.2.0
212

313
### Enhancements

MDFTextAccessibility.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "MDFTextAccessibility"
3-
spec.version = "1.2.0"
3+
spec.version = "1.2.1"
44
spec.summary = "MDFTextAccessibility assists in selecting text colors that meet the W3C standards for accessibility."
55
spec.homepage = "https://github.com/google/material-text-accessibility-ios"
66
spec.license = "Apache License, Version 2.0"

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ MDFTextAccessibility assists in selecting text colors that will meet the
44
[![Build Status](https://travis-ci.org/material-foundation/material-text-accessibility-ios.svg?branch=develop)](https://travis-ci.org/material-foundation/material-text-accessibility-ios)
55
[![Code Coverage](http://codecov.io/github/material-foundation/material-text-accessibility-ios/coverage.svg?branch=develop)](http://codecov.io/github/material-foundation/material-text-accessibility-ios?branch=develop)
66

7-
*May 24, 2016: We're still staging MDFTextAccessibility, feel free to poke
8-
around, but non-code things like CocoaPods support and continuous integration
9-
testing will be ramping up over the next few weeks. The API is relatively stable
10-
at this point.*
11-
127
## Accessibility of text
138

149
Apps created for the widest range of users should ensure that users can read

WORKSPACE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2017-present The Material Foundation Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
git_repository(
16+
name = "build_bazel_rules_apple",
17+
remote = "https://github.com/bazelbuild/rules_apple.git",
18+
commit = "7ea0557",
19+
)
20+
21+
git_repository(
22+
name = "bazel_ios_warnings",
23+
remote = "https://github.com/material-foundation/bazel_ios_warnings.git",
24+
tag = "v1.0.1",
25+
)

examples/apps/MDFTextAccessibilitySample/MDFTextAccessibilitySample.xcodeproj/project.pbxproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,12 @@
190190
files = (
191191
);
192192
inputPaths = (
193+
"${SRCROOT}/Pods/Target Support Files/Pods-MDFTextAccessibilitySample/Pods-MDFTextAccessibilitySample-frameworks.sh",
194+
"${BUILT_PRODUCTS_DIR}/MDFTextAccessibility/MDFTextAccessibility.framework",
193195
);
194196
name = "[CP] Embed Pods Frameworks";
195197
outputPaths = (
198+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MDFTextAccessibility.framework",
196199
);
197200
runOnlyForDeploymentPostprocessing = 0;
198201
shellPath = /bin/sh;
@@ -220,13 +223,16 @@
220223
files = (
221224
);
222225
inputPaths = (
226+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
227+
"${PODS_ROOT}/Manifest.lock",
223228
);
224229
name = "[CP] Check Pods Manifest.lock";
225230
outputPaths = (
231+
"$(DERIVED_FILE_DIR)/Pods-MDFTextAccessibilitySample-checkManifestLockResult.txt",
226232
);
227233
runOnlyForDeploymentPostprocessing = 0;
228234
shellPath = /bin/sh;
229-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
235+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
230236
showEnvVarsInLog = 0;
231237
};
232238
AC61D42B0C3BEBF8E7C70D21 /* [CP] Copy Pods Resources */ = {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- MDFTextAccessibility (1.2.0)
2+
- MDFTextAccessibility (1.2.1)
33

44
DEPENDENCIES:
55
- MDFTextAccessibility (from `../../..`)
66

77
EXTERNAL SOURCES:
88
MDFTextAccessibility:
9-
:path: "../../.."
9+
:path: ../../..
1010

1111
SPEC CHECKSUMS:
12-
MDFTextAccessibility: 94098925e0853551c5a311ce7c1ecefbe297cdb6
12+
MDFTextAccessibility: 8969dcdf8ef664761b47c03204b6a4d24f59e61b
1313

1414
PODFILE CHECKSUM: ba1d198039c6b887cc904c2b80f4ae8bc213c6fd
1515

16-
COCOAPODS: 1.2.0
16+
COCOAPODS: 1.3.1

resources/Info.plist

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
23+
<key>NSPrincipalClass</key>
24+
<string></string>
25+
</dict>
26+
</plist>

0 commit comments

Comments
 (0)