11 Commits

Author SHA1 Message Date
Wenyu Zhang
707b49dd0e
[Palettes] Rewrite tests in ObjC to prevent the failing unit tests on iOS 13. (#8255)
closes https://github.com/material-components/material-components-ios/issues/8254.

## Context
Error occurs when testing using Bazel.
```
'-Test Case '-[components_Palettes_unit_test_swift_sources.PaletteTests testCustomPalette]' started.
Child process terminated with signal 11: Segmentation fault
```
2019-08-09 09:53:44 -04:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

```
/\*
 Copyright ([0-9]+)-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\.
 \*/
```

```
/\*
Copyright ([0-9]+)-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\.
\*/
```

```
/\*
 Copyright ([0-9]+)-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\.
 \*/
```

```
// Copyright $1-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.
```
2018-08-31 12:13:07 -04:00
featherless
4ef8b6fdae
Initial addition of kokoro and bazel continuous integration support. (#2316)
* Initial addition of kokoro and bazel continuous integration support.

Only adds support for ActivityIndicator and its dependencies. Will add other components to the continuous integration in follow up changes.

* Add AnimationTiming.

* Fix target name.

* Use ... matching to run all tests and build all targets.

* Just run tests.

* Add skeleton tests.

* Fix copyrights and build files.

* Add bzl file.

* Standardize build files.

* Fix typo.

* Naming.

* Remove confusing comment.

* Use Xcode 8.2.
2017-11-01 13:29:49 -04:00
Martin Petrov
49ed5eb513 [Palette] Swift enums for MDCPaletteTint/Accent. (#1469)
* [Palette] Swift enums for MDCPaletteTint/Accent.

Note that this is a breaking change for Swift users. It changes
MDCPalette accent and names from stringly typed to strongly typed,
creating a new MDCPaletteTint and MDCPaletteAccent enum.

* Updated spacing

* update-unit-test
2017-05-30 17:50:05 -04:00
Martin Petrov
ec1feb81a5 [MDCPalette] Use class properties (#1470)
* Replacing methods with class properties.

* Updating docs to reflect new Swift call style.

* Updating examples.

* Updating ObjC examples to use dot syntax
2017-05-30 08:20:00 -04:00
Sam Symons
bb561ac257 [Scripts] SwiftLint integration (#1129)
* Integrate SwiftLint in the Catalog.

* Update the disabled SwiftLint rules.

* Reference a local swiftlint.yml symlink.

This prevents us from getting warnings about code style violations from the other demos.

* Fix SwiftLint violations in the Catalog and Components.

* Ignore the `third_party` directory when running the linter.

We should not have to deal with warnings in code we may not be able to fix easily.

* Integrate SwiftLint into Shrine.

Additionally, fix a number of warnings introduced.

* Run SwiftLint on Travis.

* Enable many of the previously disabled rules and correct them.

* Fix control statement violations from SwiftLint.
2017-01-06 16:37:23 -05:00
Adrian Secord
4842a362f5 Convert component examples to Swift 3 (#1002)
* WIP

* WIP

* Simplified build script and fixed it to build all schemes.

* WIP

* Renamed script to build_all and added better output.

* Add scripts/list_xcode_workspaces.

* Filtered out the CocoaPods schemes.

* Use Xcode to update Swift to v3.

* Updated tracked touches map from NSNumber to Int.

* Fixed button sorting that was not actually sorting.

* targetContentOffset no longer allowed to be nil.

* "Fixed" failing test by reducing random number range?

* Swift 3 syntax change.

* Swift 3 syntax change.

* Removed invalid center-aligning tests.

Fixed default nav bar alignment test.
2016-12-12 09:55:36 -05:00
Adrian Secord
fad8519b6a [Palettes] Generate palettes to match a target color (#729) 2016-10-06 18:24:49 -04:00
Adrian Secord
8c3af252be Adding AUTHORS and removing CONTRIBUTORS.txt.
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...

Summary:

We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.

Changed copyright statement to include non-Google authors.

Command run:

find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods  \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Added non-source files.

Command run:

grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Reviewers: featherless, O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1415
2016-08-08 08:16:37 -07:00
Adrian Secord
cdb423f898 [Palette] Added custom palette initializers.
Reviewers: lpromero, mrefaat, randallli, O1 Material components iOS

Reviewed By: lpromero, mrefaat, randallli, O1 Material components iOS

Subscribers: randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D953
2016-06-09 13:52:34 -04:00
Adrian Secord
10cfe433b0 [Palettes] Final review to land in develop.
Summary:
Merging feature-palettes into develop. This is the combination of the following reviews with no further changes:

http://codereview.cc/D818
http://codereview.cc/D827
http://codereview.cc/D842

Reviewers: #mdc_ios_owners, featherless

Reviewed By: #mdc_ios_owners, featherless

Subscribers: larche, lpromero, cjcox, featherless, mrefaat, jsachse

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D852
2016-05-10 17:27:19 -04:00