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

Commit 3fb2ea2

Browse files
author
Jeff Verkoeyen
committed
Merge branch 'release-candidate' into stable
2 parents c12d18f + 860010e commit 3fb2ea2

32 files changed

+828
-226
lines changed

.arcconfig

Lines changed: 0 additions & 26 deletions
This file was deleted.

.arclint

Lines changed: 0 additions & 45 deletions
This file was deleted.

.arcunit

Lines changed: 0 additions & 12 deletions
This file was deleted.

.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
# Jazzy
25
docs/
36

.kokoro

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2017-present The Material Motion 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+
# Fixes a bug in bazel where objc_library targets have a _ prefix.
33+
find "${tests_dir_prefix}tests/unit" -type f -name '*.swift' -exec sed -i '' -E "s/import Motion(.+)/import _Motion\1/" {} + || true
34+
# CocoaPods requires that public headers of dependent pods be implemented using framework import
35+
# notation, while bazel requires that dependency headers be imported with quoted notation.
36+
find "${tests_dir_prefix}src" -type f -name '*.h' -exec sed -i '' -E "s/import <MotionInterchange\/MotionInterchange\.h>/import \"MotionInterchange.h\"/" {} + || true
37+
stashed_dir=$(pwd)
38+
reset_imports() {
39+
# Undoes our source changes from above.
40+
find "${stashed_dir}/${tests_dir_prefix}tests/unit" -type f -name '*.swift' -exec sed -i '' -E "s/import _Motion(.+)/import Motion\1/" {} + || true
41+
find "${stashed_dir}/${tests_dir_prefix}src" -type f -name '*.h' -exec sed -i '' -E "s/import \"MotionInterchange.h\"/import <MotionInterchange\/MotionInterchange.h>/" {} + || true
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+
# https://stackoverflow.com/questions/21394536/how-to-simulate-sort-v-on-mac-osx
53+
TAG=$(git tag --sort=v:refname -l "$KOKORO_RUNNER_VERSION" | tail -n1)
54+
git checkout "$TAG" > /dev/null
55+
popd
56+
57+
fix_bazel_imports
58+
59+
./.kokoro-ios-runner/bazel.sh test //:UnitTests 8.1.0
60+
61+
echo "Success!"

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ osx_image: xcode8.1
33
sudo: false
44
before_install:
55
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
6-
- git clone https://github.com/phacility/arcanist.git
7-
- git clone https://github.com/phacility/libphutil.git
8-
- git clone --recursive https://github.com/material-foundation/material-arc-tools.git
96
- pod install --repo-update
107
script:
118
- set -o pipefail
12-
- arcanist/bin/arc unit --everything --trace
139
- xcodebuild build -workspace MotionAnimator.xcworkspace -scheme MotionAnimatorCatalog -sdk "iphonesimulator10.1" -destination "name=iPhone 6s,OS=10.1" ONLY_ACTIVE_ARCH=YES | xcpretty -c;
1410
after_success:
1511
- bash <(curl -s https://codecov.io/bash)

BUILD

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Copyright 2017-present The Material Motion 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+
# Description:
16+
# A Motion Animator creates performant, interruptible animations from motion specs.
17+
18+
load("@bazel_ios_warnings//:strict_warnings_objc_library.bzl", "strict_warnings_objc_library")
19+
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
20+
load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library")
21+
22+
licenses(["notice"]) # Apache 2.0
23+
24+
exports_files(["LICENSE"])
25+
26+
strict_warnings_objc_library(
27+
name = "MotionAnimator",
28+
srcs = glob([
29+
"src/*.m",
30+
"src/private/*.m",
31+
]),
32+
hdrs = glob([
33+
"src/*.h",
34+
"src/private/*.h",
35+
]),
36+
deps = [
37+
"@motion_interchange_objc//:MotionInterchange"
38+
],
39+
enable_modules = 1,
40+
includes = ["src"],
41+
visibility = ["//visibility:public"],
42+
)
43+
44+
swift_library(
45+
name = "UnitTestsSwiftLib",
46+
srcs = glob([
47+
"tests/unit/*.swift",
48+
]),
49+
deps = [":MotionAnimator"],
50+
visibility = ["//visibility:private"],
51+
)
52+
53+
objc_library(
54+
name = "UnitTestsLib",
55+
srcs = glob([
56+
"tests/unit/*.m",
57+
]),
58+
hdrs = glob([
59+
"tests/unit/*.h",
60+
]),
61+
enable_modules = 1,
62+
deps = [":MotionAnimator"],
63+
visibility = ["//visibility:private"],
64+
)
65+
66+
ios_unit_test(
67+
name = "UnitTests",
68+
deps = [
69+
":UnitTestsLib",
70+
":UnitTestsSwiftLib"
71+
],
72+
timeout = "short",
73+
visibility = ["//visibility:private"],
74+
)

CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
# 2.0.0
2+
3+
This major release includes several new APIs, bug fixes, and internal cleanup.
4+
5+
## Breaking changes
6+
7+
The animator now adds non-additive animations with the keyPath as the animation key. This is a
8+
behavioral change in that animations will now remove the current animation with the same key.
9+
10+
## Bug fixes
11+
12+
Implicit animations are no longer created when adding animations within a UIView animation block.
13+
14+
## New features
15+
16+
New keypath constants:
17+
18+
- backgroundColor
19+
- position
20+
- rotation
21+
- strokeStart
22+
- strokeEnd
23+
24+
New APIs on CATransaction for setting a transaction-specific timeScaleFactor:
25+
26+
```swift
27+
CATransaction.begin()
28+
CATransaction.mdm_setTimeScaleFactor(0.5)
29+
animator.animate...
30+
CATransaction.commit()
31+
```
32+
33+
## Source changes
34+
35+
* [Add support for customizing the timeScaleFactor as part of a CATransaction (#25)](https://github.com/material-motion/motion-animator-objc/commit/17601b94b19320eb4542fca12ba1fa5a2b487271) (featherless)
36+
* [[breaking] Use the keyPath as the key when the animator is not additive. (#22)](https://github.com/material-motion/motion-animator-objc/commit/bb42e617fc80604e056aee618f953d076f5c8928) (featherless)
37+
* [Disable implicit animations when adding explicit animations in the animator (#20)](https://github.com/material-motion/motion-animator-objc/commit/8be151c06d3769540a5efce9d9f00bbc7e6f1555) (featherless)
38+
* [Move private APIs to the private folder. (#17)](https://github.com/material-motion/motion-animator-objc/commit/ee19fdaad12d8a02f5b8ec655363662dfecc30cc) (featherless)
39+
* [Add rotation, strokeStart, and strokeEnd key paths. (#19)](https://github.com/material-motion/motion-animator-objc/commit/ccdffd5597d5888f63c0a3ef0204cfc9efba2a1f) (featherless)
40+
* [Extract a MDMCoreAnimationTraceable protocol from MotionAnimator. (#18)](https://github.com/material-motion/motion-animator-objc/commit/dbe5c3b5d597e6bad50bfc89b53cf0af95c435bc) (featherless)
41+
* [Add position and backgroundColor as key paths. (#15)](https://github.com/material-motion/motion-animator-objc/commit/38907aef8ec0e29aa01ce9b3c13851226802b464) (featherless)
42+
* [Replace arc with kokoro and bazel support for continuous integration. (#13)](https://github.com/material-motion/motion-animator-objc/commit/2ac68fb1ac4cdf61ba6fc7563a59417d39938074) (featherless)
43+
44+
## API changes
45+
46+
### CATransaction
47+
48+
**new** method: `mdm_timeScaleFactor`.
49+
50+
**new** method: `mdm_setTimeScaleFactor:`.
51+
52+
### Animatable key paths
53+
54+
**new** constant: `MDMKeyPathBackgroundColor`
55+
56+
**new** constant: `MDMKeyPathPosition`
57+
58+
**new** constant: `MDMKeyPathRotation`
59+
60+
**new** constant: `MDMKeyPathStrokeStart`
61+
62+
**new** constant: `MDMKeyPathStrokeEnd`
63+
64+
### MDMCoreAnimationTraceable
65+
66+
**new** protocol: MDMCoreAnimationTraceable
67+
168
# 1.1.3
269

370
This patch release resolves an Xcode 9 build warning.

MotionAnimator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "MotionAnimator"
33
s.summary = "A Motion Animator creates performant, interruptible animations from motion specs."
4-
s.version = "1.1.3"
4+
s.version = "2.0.0"
55
s.authors = "The Material Motion Authors"
66
s.license = "Apache 2.0"
77
s.homepage = "https://github.com/material-motion/motion-animator-objc"

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- CatalogByConvention (2.1.1)
3-
- MotionAnimator (1.1.3):
3+
- MotionAnimator (2.0.0):
44
- MotionInterchange
55
- MotionInterchange (1.0.1)
66

@@ -14,7 +14,7 @@ EXTERNAL SOURCES:
1414

1515
SPEC CHECKSUMS:
1616
CatalogByConvention: c3a5319de04250a7cd4649127fcfca5fe3322a43
17-
MotionAnimator: f241c4acd49dea603c3a2ea131727d57853a281b
17+
MotionAnimator: 38933cf4bdfe0183ba3ed1f8a8963b98e83a4bca
1818
MotionInterchange: 7a7c355ba2ed5d36c5cf2ceb76cacd3d3680dbf5
1919

2020
PODFILE CHECKSUM: 3c50d819e57d8329e39f3f5677139bf93ac34b8b

0 commit comments

Comments
 (0)