[google_maps_flutter] Add examples for different iOS versions (#3757)

Improves the way we specify and test the `GoogleMaps` SDK dependency on iOS. Currently as discussed in https://github.com/flutter/flutter/issues/86820, we are allowing any version of the SDK, and CocoaPods will choose the best version that's compatible with the minimum iOS deployment version of the plugin client's app. However, clients are also subject to future breakage, since any new major SDK version could have compile-time incompatibility with the plugin's wrapping code. We also have no ability to test anything in CI that's newer than the SDK that supports our oldest supported version (currently that's iOS 11, and thus 5.x).

This makes two changes:
- Replaces the single example with N examples, each with a different minimum iOS version, corresponding to each point where the Google Maps SDK has bumped its minimum iOS requirement. Currently (as documented in the new README file)
  - The oldest example has all of the current testing.
  - The newest example has just XCTests (not integration or XCUITests).
  - Intervening examples have no tests.
- Instead of the completely unpinned version, we allow anything up to the next major version (which should be the first one with breaking API changes).

This gives us build coverage of each of the (latest at CI runtime) resolve points that clients can have. We retain the flexibility of allowing clients to get the best version that meets their app's constraints, except that we will need to explicitly test and enable new major versions, so that they won't randomly break clients.

Fixes https://github.com/flutter/flutter/issues/86820
This commit is contained in:
stuartmorgan
2023-04-20 12:51:16 -07:00
committed by GitHub
parent 746750ecef
commit 7e3f5da42e
168 changed files with 3039 additions and 87 deletions

View File

@ -337,8 +337,11 @@ ${indentation * 2}Please use standard capitalizations: ${sortedListString(expect
/// Returns true if the README contains the repository-standard explanation of
/// the purpose of a federated plugin implementation's example.
bool _containsImplementationExampleExplanation(List<String> readmeLines) {
return readmeLines.contains('# Platform Implementation Test App') &&
readmeLines
.any((String line) => line.contains('This is a test app for'));
return (readmeLines.contains('# Platform Implementation Test App') &&
readmeLines.any(
(String line) => line.contains('This is a test app for'))) ||
(readmeLines.contains('# Platform Implementation Test Apps') &&
readmeLines.any(
(String line) => line.contains('These are test apps for')));
}
}