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

Commit

Permalink
Merge branch 'release-candidate' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Verkoeyen committed Dec 10, 2018
2 parents 5df8310 + 5ecc1d1 commit d300ae8
Show file tree
Hide file tree
Showing 14 changed files with 134 additions and 108 deletions.
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module: MotionAnimator
module_version: 2.8.1
module_version: 3.0.0
sdk: iphonesimulator
umbrella_header: src/MotionAnimator.h
objc: true
github_url: https://github.com/material-motion/motion-animator-objc
github_file_prefix: https://github.com/material-motion/motion-animator-objc/tree/v2.8.1
github_file_prefix: https://github.com/material-motion/motion-animator-objc/tree/v3.0.0
81 changes: 39 additions & 42 deletions .kokoro
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,44 @@ set -e
# Display commands to stderr.
set -x

KOKORO_RUNNER_VERSION="v4.*"

POSITIONAL=()
while [[ $# -gt 0 ]]; do
key="$1"

case $key in
-v|--verbose)
VERBOSE_OUTPUT="1"
shift
;;
*)
POSITIONAL+=("$1")
shift
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters

if [ -n "$KOKORO_BUILD_NUMBER" ]; then
# Always enable verbose output on kokoro runs.
VERBOSE_OUTPUT=1
fi

if [ -n "$VERBOSE_OUTPUT" ]; then
# Display commands to stderr.
set -x
verbosity_args="-v"
fi

if [ ! -d .kokoro-ios-runner ]; then
git clone https://github.com/material-foundation/kokoro-ios-runner.git .kokoro-ios-runner
fi

pushd .kokoro-ios-runner
git fetch > /dev/null
# https://stackoverflow.com/questions/21394536/how-to-simulate-sort-v-on-mac-osx
TAG=$(git tag --sort=v:refname -l "$KOKORO_RUNNER_VERSION" | tail -n1)
git checkout "$TAG" > /dev/null
popd

./.kokoro-ios-runner/bazel.sh test //:UnitTests --min-xcode-version 8.1.0 $verbosity_args
BAZEL_VERSION="0.20.0"
IOS_MINIMUM_OS="8.0"
IOS_CPUS="i386,x86_64"

get_xcode_version_from_path() {
path="$1"
cat "$path/version.plist" \
| grep "CFBundleShortVersionString" -A1 \
| grep string \
| cut -d'>' -f2 \
| cut -d'<' -f1
}

run_bazel() {
echo "Running bazel builds..."

if [ -n "$KOKORO_BUILD_NUMBER" ]; then
bazel version
use_bazel.sh "$BAZEL_VERSION"
bazel version

# Move into our cloned repo
cd github/repo
fi

# Run against whichever Xcode is currently selected.
selected_xcode_developer_path=$(xcode-select -p)
selected_xcode_contents_path=$(dirname "$selected_xcode_developer_path")

xcode_version=$(get_xcode_version_from_path "$selected_xcode_contents_path")

bazel clean
bazel test //... \
--xcode_version "$xcode_version" \
--ios_minimum_os="$IOS_MINIMUM_OS" \
--ios_multi_cpus="$IOS_CPUS"
}

run_bazel

echo "Success!"
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: objective-c
osx_image: xcode9.2
sudo: false
env:
global:
Expand Down
8 changes: 5 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# Description:
# A Motion Animator creates performant, interruptible animations from motion specs.

load("@build_bazel_rules_apple//apple:ios.bzl", "ios_ui_test")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load("@bazel_ios_warnings//:strict_warnings_objc_library.bzl", "strict_warnings_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

Expand Down Expand Up @@ -70,12 +70,14 @@ objc_library(
visibility = ["//visibility:private"],
)

ios_unit_test(
ios_ui_test(
name = "UnitTests",
deps = [
":UnitTestsLib",
":UnitTestsSwiftLib"
],
test_host = "@build_bazel_rules_apple//apple/testing/default_host/ios",
minimum_os_version = "8.0",
timeout = "short",
visibility = ["//visibility:private"],
)
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# 3.0.0

This major release upgrades the bazel dependencies and workspace. This change is breaking for anyone
using bazel to build this library. In order to use this library with bazel, you will also need to
upgrade your workspace versions to match the ones now used in this library's `WORKSPACE` file.

## Source changes

* [Make tests more robust to crashing failures. (#118)](https://github.com/material-motion/motion-animator-objc/commit/d2f5971a554d2e63b74a3ad7d36cd9b7ed7823ca) (featherless)

## Non-source changes

* [Automatic changelog preparation for release.](https://github.com/material-motion/motion-animator-objc/commit/2f7d3af5fd9cf6bdcb88e0b955e7ceb903dc9b22) (Jeff Verkoeyen)
* [Update bazel workspace to latest versions. (#120)](https://github.com/material-motion/motion-animator-objc/commit/e28f79e51bbfa7a41d7c9941e7a0ba7beaaa05ff) (featherless)
* [Don't animate system views with the animator. (#119)](https://github.com/material-motion/motion-animator-objc/commit/c8057832a9f961585978d59a7ea03e8f641d8ae6) (featherless)
* [Update .travis.yml](https://github.com/material-motion/motion-animator-objc/commit/e839e817c80aa8df34faacf7fe95d6fb1d508643) (featherless)
* [Update .kokoro](https://github.com/material-motion/motion-animator-objc/commit/4eed01c25d7fd84fe9e48f147f195987ebbf26e9) (featherless)
* [Update .kokoro](https://github.com/material-motion/motion-animator-objc/commit/55dd1b14f243418bf4d4fe4ea0eb0a6bcfbb88de) (featherless)
* [Update bazel workspace and version to latest. (#117)](https://github.com/material-motion/motion-animator-objc/commit/b8261f30f3437c75e8bc1b9f25c074304acc43b5) (featherless)

# 2.8.1

This patch release resolves some runtime crashes, improves the stability of our unit tests, and features an improved README.md.
Expand Down
4 changes: 2 additions & 2 deletions MotionAnimator.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "MotionAnimator"
s.summary = "A Motion Animator creates performant, interruptible animations from motion specs."
s.version = "2.8.1"
s.version = "3.0.0"
s.authors = "The Material Motion Authors"
s.license = "Apache 2.0"
s.homepage = "https://github.com/material-motion/motion-animator-objc"
Expand All @@ -12,5 +12,5 @@ Pod::Spec.new do |s|
s.public_header_files = "src/*.h"
s.source_files = "src/*.{h,m,mm}", "src/private/*.{h,m,mm}"

s.dependency "MotionInterchange", "~> 1.6"
s.dependency "MotionInterchange", "~> 2.0"
end
21 changes: 13 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
PODS:
- CatalogByConvention (2.4.1)
- CatalogByConvention (2.5.1)
- MotionAnimator (2.8.1):
- MotionInterchange (~> 1.6)
- MotionInterchange (1.6.0)
- MotionInterchange (~> 2.0)
- MotionInterchange (2.0.0)

DEPENDENCIES:
- CatalogByConvention
- MotionAnimator (from `./`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- CatalogByConvention
- MotionInterchange

EXTERNAL SOURCES:
MotionAnimator:
:path: ./
:path: "./"

SPEC CHECKSUMS:
CatalogByConvention: 16cd56d7e75b816e4eda0d62f9c5f0c82da8baff
MotionAnimator: 07399ec033ab44256276d71037402413922fbb89
MotionInterchange: ead0e3ae1f3a5fb539e289debbc7ae036160a10d
CatalogByConvention: 2b58a9b64e5b1049abb5d3f8e764a551bbe843a7
MotionAnimator: ab78e3a6eb59f1061c2c00dd09dc923f254f4a61
MotionInterchange: 5b7325142e4af884278bab7adcd264976a8c0593

PODFILE CHECKSUM: 3537bf01c11174928ac008c20fec4738722e96f3

COCOAPODS: 1.4.0
COCOAPODS: 1.5.3
35 changes: 32 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,49 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

git_repository(
name = "build_bazel_rules_apple",
remote = "https://github.com/bazelbuild/rules_apple.git",
commit = "7ea0557",
tag = "0.9.0",
)

load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)

apple_rules_dependencies()

git_repository(
name = "build_bazel_rules_swift",
remote = "https://github.com/bazelbuild/rules_swift.git",
tag = "0.4.0",
)

load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)

swift_rules_dependencies()

git_repository(
name = "bazel_ios_warnings",
remote = "https://github.com/material-foundation/bazel_ios_warnings.git",
tag = "v1.0.1",
tag = "v2.0.0",
)

git_repository(
name = "motion_interchange_objc",
remote = "https://github.com/material-motion/motion-interchange-objc.git",
tag = "v1.6.0",
commit = "v2.0.0",
)

http_file(
name = "xctestrunner",
executable = 1,
urls = ["https://github.com/google/xctestrunner/releases/download/0.2.5/ios_test_runner.par"],
)
4 changes: 1 addition & 3 deletions examples/CalendarCardExpansionExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ - (void)didTap {
animator.shouldReverseValues = !_expanded;
animator.beginFromCurrentState = YES;

[animator animateWithTraits:traits.navigationBarY animations:^{
[self.navigationController setNavigationBarHidden:_expanded animated:YES];
}];
[self.navigationController setNavigationBarHidden:_expanded animated:YES];

CGRect chipFrame = [self frameForChip];
CGRect headerFrame = [self frameForHeader];
Expand Down
2 changes: 0 additions & 2 deletions examples/CalendarChipMotionSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
@property(nonatomic, strong, nonnull, readonly) MDMAnimationTraits *chipContentOpacity;
@property(nonatomic, strong, nonnull, readonly) MDMAnimationTraits *headerContentOpacity;

@property(nonatomic, strong, nonnull, readonly) MDMAnimationTraits *navigationBarY;

@end

@interface CalendarChipMotionSpec: NSObject
Expand Down
4 changes: 0 additions & 4 deletions examples/CalendarChipMotionSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ - (MDMAnimationTraits *)headerContentOpacity {
return [[MDMAnimationTraits alloc] initWithDelay:0.000 duration:0.075 timingCurve:LinearTimingCurve()];
}

- (MDMAnimationTraits *)navigationBarY {
return [[MDMAnimationTraits alloc] initWithDelay:0.045 duration:0.150 timingCurve:StandardTimingCurve()];
}

@end

@implementation CalendarChipMotionSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@
666FAA7E1D384A6B000363DA /* Resources */,
46589CD14086D52DE668B341 /* Frameworks */,
ADB887B84C3967A0391C7DFD /* [CP] Embed Pods Frameworks */,
3BBBD44AA3DB97C7EC0790DE /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -300,7 +299,6 @@
666FAA921D384A6B000363DA /* Resources */,
B21725FF37D7BCD809C7A6E1 /* Frameworks */,
1457D44967464C8E3A8E97E8 /* [CP] Embed Pods Frameworks */,
5C96FE89C18D5F2BCCB526AD /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -424,21 +422,6 @@
shellScript = "\"${SRCROOT}/../../../Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3BBBD44AA3DB97C7EC0790DE /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../../../Pods/Target Support Files/Pods-MotionAnimatorCatalog/Pods-MotionAnimatorCatalog-resources.sh\"\n";
showEnvVarsInLog = 0;
};
5A3F2ED10BF3C472BA1601C5 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -457,21 +440,6 @@
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";
showEnvVarsInLog = 0;
};
5C96FE89C18D5F2BCCB526AD /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../../../Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
ADB887B84C3967A0391C7DFD /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
12 changes: 7 additions & 5 deletions tests/unit/BeginFromCurrentStateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,12 @@ class BeginFromCurrentStateTests: XCTestCase {

XCTAssertEqual(addedAnimations.count, 2)

let animation = addedAnimations.last as! CABasicAnimation
XCTAssertFalse(animation.isAdditive)
XCTAssertEqual(animation.keyPath, AnimatableKeyPath.opacity.rawValue)
XCTAssertEqual(animation.fromValue as! Float, initialValue)
XCTAssertEqualWithAccuracy(animation.toValue as! CGFloat, 1.0, accuracy: 0.0001)
if addedAnimations.count == 2 {
let animation = addedAnimations.last as! CABasicAnimation
XCTAssertFalse(animation.isAdditive)
XCTAssertEqual(animation.keyPath, AnimatableKeyPath.opacity.rawValue)
XCTAssertEqual(animation.fromValue as! Float, initialValue)
XCTAssertEqualWithAccuracy(animation.toValue as! CGFloat, 1.0, accuracy: 0.0001)
}
}
}
Loading

0 comments on commit d300ae8

Please sign in to comment.