243 Commits

Author SHA1 Message Date
Wenyu Zhang
bf453a83f4 Update nullability guidance.
PiperOrigin-RevId: 473788724
2022-09-12 10:48:50 -07:00
Janette James
7a222459db Mark as to be deprecated
PiperOrigin-RevId: 468758723
2022-08-19 12:19:23 -07:00
Arthur Milchior
40aa55bcfe
Update a link (#10259) 2022-08-19 13:00:46 -04:00
Jeff Verkoeyen
5874e43f47 Bump our supported minimum iOS version to iOS 11.
PiperOrigin-RevId: 370682354
2021-04-27 08:13:37 -07:00
Randall Li
50d666f6b2 [go/material-ios-deprecation-policy] Adding link to go/material-ios-deprecation-process an internal doc.
PiperOrigin-RevId: 358091881
2021-02-17 20:20:48 -08:00
Alyssa Weiss
2bb776a0a7 Remove Google specific deprecation policy from Github.
PiperOrigin-RevId: 355839846
2021-02-05 06:42:53 -08:00
Alyssa Weiss
72b541af9a Update steps in the deprecation process.
PiperOrigin-RevId: 354940440
2021-02-01 08:05:06 -08:00
Andrew Overton
378fab16a8 [ActionSheet] Remove reference to beta
PiperOrigin-RevId: 328730876
2020-08-27 07:11:35 -07:00
Jeff Verkoeyen
d7ff705337 Drop support for iOS 9.
PiperOrigin-RevId: 326015653
2020-08-11 07:21:40 -07:00
Andrew Overton
07c46757cc Replace material.io API doc links with links to the relevant header f…
This PR replaces API links containing "/api-docs/" with links to suitable header files in GitHub because the site previously linked to is being taken down and replaced with something that won't handle API docs.

Closes https://github.com/material-components/material-components-ios/pull/10045

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10045 from andrewoverton:replace-mio-api-docs-with-github-links 0d6e56cc11d0c147366a4f6cde829d8b51567ecc
PiperOrigin-RevId: 323424362
2020-07-27 13:09:23 -07:00
Jeff Verkoeyen
8abbb099a9 Delete all bazel support.
We no longer support bazel.

This PR deletes everything related to bazel support from our repo.

Closes https://github.com/material-components/material-components-ios/pull/9968

PiperOrigin-RevId: 306227127
2020-04-13 07:13:47 -07:00
Robert Moore
499a4820f9
[Docs] Replace releasing instructions with general steps. (#9418)
The releasing process is being combined in a Google-internal document to
reduce errors introduced by jumping between the two documents.  The current
`releasing.md` is being replaced with general information about the release
process that may be relevant to clients and contributors.

The previous contents of this file have already been imported to Google by
cl/289097261.

Part of #9399
2020-01-10 13:11:44 -05:00
featherless
26b5e48574
[bazel] Implement Swift import rewriting as part of Bazel. (#9368)
Context
-------

Prior to this PR we were unable to build our Swift source code as part of the Bazel toolchain because our source supports CocoaPods-style framework imports out of the box. E.g.:

```swift
import MaterialComponents.MaterialAppBar
```

Supporting CocoaPods imports enables us to use a pure open source workflow with our code that ensures we're using and validating the latest community technologies (including CocoaPods and native Xcode build systems). Changing our source to Bazel-first was explored as an option for this PR, but was rejected in service to maintaining our CocoaPods support.

The way we solved this import problem before this PR was to perform a global rewrite of import statements prior to invoking any `bazel` commands. This rewrite phase happened as part of the `.kokoro` script. This meant that the only way to run `bazel` commands on our repo was through the `.kokoro` bootstrap script.

This change does not yet entirely remove our need for the `.kokoro` bootstrap script, but it does remove the need for it to rewrite Swift imports. This change is one part of #5491.

The change
----------

This change introduces a new drop-in replacement for swift_library called `_mdc_cocoapods_compatible_swift_library` (for private use within the `material_components_ios.bzl` file) and `mdc_swift_library` for use in all BUILD files. `_mdc_cocoapods_compatible_swift_library` is made use of by several `mdc_` rules, including the new `mdc_swift_library` rule which should now be used instead of `swift_library` throughout our repo.

The new rule's implementation is documented in the source.

The impact
----------

Prior to this change, running the following command:

```
bazel build //components/Typography:SwiftExamples
```

Would result in the following error:

```
components/Typography/examples/TypographyFontListExample.swift:15:8: error: no such module 'MaterialComponents.MaterialTypography'
import MaterialComponents.MaterialTypography
```

After this change, running that same command will give the following successful result:

```
INFO: Invocation ID: 324c8887-d733-42ce-be06-20d9823bf718
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed target //components/Typography:SwiftExamples (3 packages loaded, 365 targets configured).
INFO: Found 1 target...
Target //components/Typography:SwiftExamples up-to-date:
  bazel-bin/components/Typography/libSwiftExamples.a
  bazel-bin/components/Typography/components_Typography_SwiftExamples.swiftdoc
  bazel-bin/components/Typography/components_Typography_SwiftExamples.swiftmodule
INFO: Elapsed time: 4.299s, Critical Path: 4.01s
INFO: 2 processes: 2 darwin-sandbox.
INFO: Build completed successfully, 3 total actions
```

Note that as a result of this change, build output for the transformed src will point to the generated source files rather than the original source files. E.g.:

```
ERROR: /Users/featherless/workbench/material-components-ios/components/Typography/BUILD:55:1: SwiftCompile components/Typography/components_Typography_SwiftExamples.swiftmodule failed (Exit 1) bazel_xcode_wrapper failed: error executing command bazel-out/host/bin/external/build_bazel_rules_swift/tools/wrappers/bazel_xcode_wrapper bazel-out/host/bin/external/build_bazel_rules_swift/tools/wrappers/swift_wrapper /usr/bin/xcrun swiftc ... (remaining 3 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/darwin-fastbuild/genfiles/components/Typography/examples/TypographyFontListExample.bazel_imports.swift:20:1: error: expressions are not allowed at the top level
typo
^
bazel-out/darwin-fastbuild/genfiles/components/Typography/examples/TypographyFontListExample.bazel_imports.swift:20:1: error: use of unresolved identifier 'typo'
typo
^~~~
```

This is the downside to this change, but it only materially impacts eng workflows if we start using Bazel to generate Xcode projects. As command line output, it's fairly straightforward to transform the path to the correct original source path. If we do someday move to a Bazel-generated Xcode project workflow, then we should also revisit our assumption that our source should support CocoaPods out of the box. As noted at the beginning of this PR, however, this consideration is deemed out of scope for this PR.
2020-01-02 12:18:38 -05:00
featherless
d097de9b73
Revert "[scripts/release] Always branch off of stable. (#9310)" (#9341)
This reverts commit ca81e6e42826956e1912665a8e8077ab0d9705be.

The reverted commit does not actually fix the ancestry problem for a given release and the change was adding an unnecessary merge operation as a result. Simply branching off of `develop` is sufficient to create history from `stable` to `develop`.

In a follow-up change, I will address the actual root problem of `develop` not having an ancestral relations to the `stable` release commits.
2019-12-26 15:51:42 -05:00
featherless
ca81e6e428
[scripts/release] Always branch off of stable. (#9310)
Prior to this change, our release process was merging `develop` directly into `stable` without first branching off of `stable`.

The result of this process was that `stable` shares no common ancestor with `develop`, making it difficult to calculate differences between a commit on `develop` and a commit on `stable`.

One example of where this becomes problematic is in generating internal CLs for our PRs and for `develop`. It is not possible to compute the delta between the most recent `stable` commit that was mirrored internally and a given `develop` commit, making it difficult for tooling to apply deltas to the internal codebase without simply blowing away the internal directory and checking out the desired `develop` commit.

To fix this problem, we need to create a common ancestor between `develop` and `stable`. To do so, when cutting a release we need to cut the `release-candidate` from `stable` rather than `develop`, and then immediately merge `develop` into the release-candidate. This creates a common ancestor between `develop` and `stable`.

Note that this change causes us to deviate from the pure git flow model we have historically been following, as shown in the before/after of the model below (note the new red lines connecting stable to develop).

| Before | After |
|:--|:--|
| ![git-model@2x](https://user-images.githubusercontent.com/45670/71178792-ebf05600-223c-11ea-9f16-df72bd13a067.png) | ![git-model@2x copy 2](https://user-images.githubusercontent.com/45670/71179290-dd566e80-223d-11ea-8eab-2487490985f6.png) |
2019-12-19 12:54:06 -05:00
Randall Li
172e8d7acd
Release cut adjustment to generated change log (#9221)
Removed `## Changes` heading from the auto generated changes in release cut script because heading is a duplicate of the one above it.
2019-12-13 11:16:47 -05:00
Robert Moore
b1b6a6fa2e [Kokoro] Link to the binary installer (#8642)
Links directly to the correct binary installer release page to make it easier for contributors to get the expected version of Bazel.
2019-10-24 10:53:05 -04:00
Robert Moore
ac9533d5b7
[Releasing] Perform pod lib lint early (#8289)
Instead of waiting until a bunch of work has been done to fix/update internal build issues, the `pod lib lint` step should happen as soon as the branch is created. This is because any potential issue caught by CocoaPods is likely to have a downstream effect on internal code.
2019-08-12 14:25:38 -04:00
Robert Moore
5aa413352a
[Releasing] Allow warnings in pod lib lint (#8288)
We allow warnings during trunk push, so we should be testing `pod lib lint` with allowed warnings.
2019-08-12 14:18:01 -04:00
featherless
e18f33e2b4 [releasing] Add requirements to post status updates about the release (#7477)
Cutting a release can take time and can sometimes be challenging, so sharing status updates with the team as the release progresses ensures that the team is informed of the status of the release. This PR adds a note about communicating the status of the release to the team's internal chat room.
2019-05-24 16:32:24 +03:00
Robert Moore
b2bb60c789
[Docs] Point first internal step at Requirements (#7422)
The first internal steps require some one-time set-up (in the future possibly repeated set-up) and shouldn't be skipped. Pointing the link to the Requirements section so those can be seen and attended to by the release engineer.
2019-05-20 12:51:32 -04:00
Robert Moore
39b3104413
[Releasing] Don't use sudo to print xcode-select (#7373) 2019-05-13 13:58:52 -04:00
Randall Li
97fb84f62a [MDC release] Publish cocoapods allows warnings (#7336)
Because of a warning in the linter about no swift version specified (https://github.com/material-components/material-components-ios/issues/7318) we need to allow warnings in order to publish the podspec
2019-05-03 00:20:17 +03:00
Robert Moore
4a160e5de6
[Docs] Make "Share something" clearly optional (#7328)
The emoji in the releasing documentation wasn't clear on its meaning/purpose. Particularly for people who don't know how to read emojis, the meaning is lost.  Changing it to "optional" to make it clearer that it's a nice thing to do but not strictly required for releasing.

Fixes #7324
Follow-up to #7321
2019-05-02 11:32:21 -04:00
featherless
7cc4d59b57 [docs] Add to our release process (#7321) 2019-05-01 18:36:57 -04:00
Michael Schneider
f43eacbdb3 Small contributing fix for opening the MDCCatalog workspace (#7317) 2019-05-01 20:41:22 +03:00
featherless
a3e215daa7
[ios8]! Drop support for iOS 8 in all components. (#7135)
Closes https://github.com/material-components/material-components-ios/issues/4656

I used the following `grep` to find references to iOS 8:

    grep -rI "8\.0" .
2019-04-12 23:08:35 +03:00
featherless
7eac8da8f7
Update our release version number documentation (#6995) 2019-04-10 20:19:33 +03:00
featherless
8700662caa
Encourage cutting releases earlier in the week (#6707)
As discussed in our OKR review last Friday, I'm updating our release guidance to encourage us to cut releases as early in a given week as possible.
2019-04-02 02:00:18 +03:00
featherless
7fbc9455fa
[releasing] Add first-time tools installation (#6760)
Added first-time tool installation steps. I needed to run these commands on my new MacBook in order to get the release toolchain to run.
2019-03-22 09:16:51 -04:00
Robert Moore
d4a2d5df8d
[Beta] Point main pod to github/develop (#6952)
Our Beta instructions failed to have clients point the `MaterialComponents` pod target at the `develop` branch of our Git repository.  This often results in a mismatch in code found in `develop` (for Beta) and `stable` (for the released versions).

Addresses issues seen in #6949
2019-03-20 15:54:27 -04:00
Robert Moore
385841030e
[Docs] Make bazel installer explicit (#6953)
Brew is not a good option for bazel installs since it doesn't allow downgrading versions. We only support 0.20 at the moment, so clients should use the specific installer script for 0.20.
2019-03-20 15:54:15 -04:00
Randall Li
09d34488c1
[Releasing] Moved hotfix instructions above create PR (#6582)
When cutting a hotfix we should still remember to create a PR for the release branch.
This ordering will encourage us not to miss a step.
2019-02-13 12:45:19 -05:00
Robert Moore
1785bcd356
[Releasing] Require presubmits to pass (#6577)
The instructions didn't previously require presubmit checks to pass. Making it clear that this is a required step before merging.
2019-02-09 00:11:57 -05:00
Robert Moore
9568247eed
{releasing.md} Add instruction to update the title (#6459)
Once the release version is determined, the title of the PR should be updated and reviews requested.
2019-01-28 08:53:08 -05:00
Robert Moore
ea9249585c
{releasing.md} Fix temporary PR title (#6455)
While the PR for a release is still an in-progress work, we need to add the correct marker to either the title or summary. Since the `[]` markers at the beginning of a title are reserved for component names, we can use `{}` markers instead for the same purpose.
2019-01-24 07:24:53 -05:00
Robert Moore
3c941231c6
{releasing.md} Make PR link more descriptive (#6456)
To make the link text more meaningful to screen reader users, a better description of the destination should be provided in the hyperlink text.
2019-01-23 11:06:57 -05:00
Robert Moore
71fee37bbf
{Releasing} Add step for .gitattributes to documentation. (#6352)
Adding a new "setup" step for release engineers to run before cutting the
release. This step will be important to avoid merging changes to
`.gitattributes` from `develop` into `stable` and overwriting the custom
values there.

Documentation for #6350
Follow-up to #5956
2019-01-16 14:11:36 -05:00
Bartholomew Furrow
b2048a356d [Documentation] Adds a "getting started" section to contributing/README.md (#6155)
Thanks to @codeman7 for his help getting me started on #6151. I found this hard enough to do on my own that I thought others might have trouble too. I realize there are many questions of taste that go into this sort of documentation:
- Does it belong here, or somewhere else?
- Are any of the steps too detailed, or not detailed enough?
- Does it start too early? In other words, would anybody who's reading this actually need the first few steps?
- Should I mention how to work around #5825 as a Known Issue, or should I assume that will get fixed soon enough that it isn't worth mentioning?

I'm assuming I don't have this written *exactly* the way you'd like it, so this PR is intended to start a discussion.
2019-01-07 16:58:48 -05:00
Randall Li
ee4140a9e5 Update documentation and usages of objc_bundle to apple_bundle_import, because we stoped using the older one. (#6171)
Update documentation and usages of objc_bundle to apple_bundle_import because we stopped using the older one.
2019-01-02 14:37:55 -05:00
Randall Li
0f6f2c086d
[Release Docs] Highlighted creating release PR. (#5925)
* [Release Docs] Highlighted creating release PR.

This change makes the action needed to be taken by release cop more prominent so that it is not skipped.

* Update contributing/releasing.md

Co-Authored-By: randallli <randallli@google.com>
2018-12-21 14:36:55 -05:00
Robert Moore
644039f253 {Documentation} Mark "Sanity check" as optional. (#6056)
The Sanity Check steps seem to be a bunch of required steps that aren't
necessary if the release engineer has followed the previous instructions.
Instead, it can be an optional set of helpful commands.
2018-12-21 10:25:55 -05:00
featherless
003cf8bcd9
[automated] Make mdc_unit_test_suite's name explicit. (#6080)
This change was automatically generated by running a find replace of the following strings:

```
mdc_unit_test_suite(

mdc_unit_test_suite(
    name = "unit_tests",
```

And then running buildifier to enforce style:

    find . -name BUILD | xargs ~/buildifier
2018-12-20 12:36:05 -05:00
Robert Moore
0415dd27c5
{docs/releasing.md} Fix the name of the release-blocking client group (#6046) 2018-12-19 22:43:34 -05:00
featherless
73bdc03c2b
[automated] Rename MaterialComponentsAlpha to MaterialComponentsBeta. (#6018)
This is an automated change generated by replacing all instances of MaterialComponentsAlpha with MaterialComponentsBeta. This is not a breaking change because changes to Alpha/Beta components (including renaming them) are not considered breaking.

The MaterialComponentsAlpha podspec was mistakenly named Alpha, when what we meant was more close to Beta. The distinction is that Alpha components are not expected to be used by clients, while Beta components are.
2018-12-14 10:47:31 -05:00
rami-a
5f3d5014f9
Document the steps to add snapshot tests to a component (#5973)
We should document how to add snapshot tests so that anyone can write them.
2018-12-11 10:44:53 -05:00
Randall Li
a073f40014
[Release docs] Suggest update to CHANGELOG.md (#5937)
Added section suggesting that you update the CHANGELOG.md so that it is more accurate.
2018-12-07 14:27:10 -05:00
Randall Li
9c7de41d14
[Release Docs] Added git-lfs instructions (#5921)
Added to the  ## Before you start "one time" instructions.
2018-12-05 12:01:14 -05:00
rami-a
2b6da5f104
Add git-lfs instructions to tools documentation (#5877)
Adding documentation describing installing git-lfs
2018-12-05 09:51:02 -05:00
Yarden Eitan
2625c58c32
[Release Docs] Updated release docs to be better defined. (#5775)
This PR is an effort to make the release process better defined and more clear about the steps.
2018-11-20 10:49:05 -05:00