Skip to content

Conversation

@camsim99
Copy link
Contributor

@camsim99 camsim99 commented Sep 26, 2023

Adds option to update-dependencies command to update the compile SDK version of plugins or their example apps.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

camsim99 added 30 commits May 1, 2023 16:46
@camsim99 camsim99 marked this pull request as ready for review October 23, 2023 23:15
@camsim99 camsim99 requested review from a team and stuartmorgan-g October 23, 2023 23:16
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor changes.

return true;
}
}
return false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Everything from 153 to here could collapse to:

// Check whether this is one of the enclosing package's examples.
return enclosingPackage.getExamples().any((RepositoryPackage p) => p.path == path);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooo this is neat!

_AndroidDepdencyType.compileSdk:
'Updates compileSdk version used to compile plugins.',
_AndroidDepdencyType.compileSdkForExamples:
'Updates compileSdk version used to compile plugin examples',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This is missing the . that the others have.

]);
}

Future<PackageResult> _runForAndroidDependencyOnExample(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: ...Examples

example.platformDirectory(FlutterPlatform.android);
File? fileToUpdate;
RegExp? dependencyVersionPattern;
String? newDependencyVersionEntry;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be final and non-nullable, and the if/else if chain should have an else that throws. Then you won't need to force-unwrap these later, and the compiler will enforce that they are set in every branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually super good to know, thank you!!

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2023
@auto-submit auto-submit bot merged commit 64dbd3a into flutter:main Oct 31, 2023
PROGrand pushed a commit to mtbo-org/packages that referenced this pull request Nov 1, 2023
…ies command (flutter#5010)

Adds option to `update-dependencies` command to update the compile SDK version of plugins or their example apps.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 1, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 1, 2023
flutter/packages@c9fec61...6ad40b9

2023-11-01 [email protected] Roll Flutter from e12d1a7 to 29b2516 (34 revisions) (flutter/packages#5290)
2023-11-01 [email protected] [file_selector] Updates iOS to Pigeon 13 (flutter/packages#5268)
2023-10-31 [email protected] [camera_avfoundation] ð��� Fix inverted orientation strings (flutter/packages#5261)
2023-10-31 [email protected] [tool] Add option for Android compile SDK version to update-dependencies command (flutter/packages#5010)
2023-10-31 [email protected] [video_player] Update iOS/macOS to Pigeon 13 (flutter/packages#5270)
2023-10-31 [email protected] [video_player] Update example app to replace `ButtonBar` with `OverflowBar` (flutter/packages#5274)
2023-10-31 [email protected] [image_picker] Update iOS to Pigeon 13 (flutter/packages#5266)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants