Skip to content

[ci] Work around Google Maps podspec lint issue #5913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions script/tool/lib/src/podspec_check_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@ class PodspecCheckCommand extends PackageLoopingCommand {
final String podspecBasename = podspec.basename;
print('Linting $podspecBasename');

// Hack the google_maps_flutter plugin's podspec to require iOS 13+, so that
// it gets a version of GoogleMaps that supports arm64 simulators, allowing
// linting to work on arm64 machines without forcing all plugin clients off
// of arm64 simulators.
// TODO(stuartmorgan): Remove this hack once
// https://github.com/flutter/flutter/issues/94491 is done.
String? originalPodspec;
if (podspecBasename == 'google_maps_flutter_ios.podspec') {
originalPodspec = podspec.readAsStringSync();
podspec.writeAsStringSync(
originalPodspec.replaceAll(":ios, '12.0'", ":ios, '13.0'"));
}

// Lint plugin as framework (use_frameworks!).
final ProcessResult frameworkResult =
await _runPodLint(podspecPath, libraryLint: true);
Expand All @@ -140,6 +153,10 @@ class PodspecCheckCommand extends PackageLoopingCommand {
print(libraryResult.stdout);
print(libraryResult.stderr);

if (originalPodspec != null) {
podspec.writeAsStringSync(originalPodspec);
}

return frameworkResult.exitCode == 0 && libraryResult.exitCode == 0;
}

Expand Down