[All] Expand artifact hub to all plugins#4645
[All] Expand artifact hub to all plugins#4645auto-submit[bot] merged 13 commits intoflutter:mainfrom
Conversation
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM with some minor comments. I'm looking forward to the reduced flake :)
| File _getBuildGradleFile(Directory dir) => dir.childFile('build.gradle'); | ||
|
|
||
| // Returns the settings gradle file in the given directory. | ||
| File _getSettignsGradleFile(Directory dir) => |
| final RegExp keyPresentRegex = | ||
| RegExp("$keyVariable\\s+=\\s+'ARTIFACT_HUB_REPOSITORY'"); | ||
| final RegExp documentationPresentRegex = RegExp( | ||
| r'github.com.*wiki.*Plugins-and-Packages-repository-structure.*gradle-structure'); |
There was a problem hiding this comment.
I get lint warnings when I use \ as unnecessary values in a string. I opted for the looser regex instead of ignoring the lint.
There was a problem hiding this comment.
Maybe you need \\ even in a raw string then? I forget the rules around \ for raw strings.
There was a problem hiding this comment.
I think it is actually a false warning where dart assumes \ is used to escape and it is warning me that I dont need to escape .
... Except I do for regular expressions.
There was a problem hiding this comment.
| final RegExp documentationPresentRegex = RegExp( | ||
| r'github.com.*wiki.*Plugins-and-Packages-repository-structure.*gradle-structure'); | ||
| final RegExp keyReadRegex = | ||
| RegExp('if.*System.getenv.*containsKey.*$keyVariable'); |
There was a problem hiding this comment.
Are the wildcards here just to avoid the readability hit of lots of \s?
There was a problem hiding this comment.
yes and I got lint warnings.
There was a problem hiding this comment.
Made the regex match a smaller set of inputs with \
| final RegExp documentationPresentRegex = RegExp( | ||
| r'github.com.*wiki.*Plugins-and-Packages-repository-structure.*gradle-structure'); | ||
| final RegExp keyReadRegex = | ||
| RegExp('if.*System.getenv.*containsKey.*$keyVariable'); |
| final RegExp keyReadRegex = | ||
| RegExp('if.*System.getenv.*containsKey.*$keyVariable'); | ||
| final RegExp keyUsedRegex = | ||
| RegExp('maven.*url.*System.getenv.*$keyVariable.*'); |
| gradleLines.any((String line) => keyUsedRegex.hasMatch(line)); | ||
|
|
||
| if (!documentationPresent) { | ||
| printError('Does not link artifact hub documentation.'); |
There was a problem hiding this comment.
This should print out the comment to add.
There was a problem hiding this comment.
After seeing this output run on packages missing artifact hub implementation I removed documentation as a separate printed error since it is included in the combined string.
| /// configuration that enables artifact hub env variable. | ||
| @visibleForTesting | ||
| static String exampleRootSettingsArtifactHubString = ''' | ||
| // See https://github.com/flutter/flutter/wiki/Plugins-and-Packages-repository-structure#gradle-structure for more info. |
There was a problem hiding this comment.
Let's extract this URL to a constant that's used in both statics.
| bool _validateArtifactHubSettingsUsage( | ||
| RepositoryPackage example, List<String> gradleLines) { | ||
| final RegExp documentationPresentRegex = RegExp( | ||
| r'github.com.*wiki.*Plugins-and-Packages-repository-structure.*gradle-structure'); |
There was a problem hiding this comment.
Same comments in these strings about escaping literal .s
| .any((String line) => artifactRegistryPluginApplyRegex.hasMatch(line)); | ||
|
|
||
| if (!documentationPresent) { | ||
| printError('Does not link artifact hub documentation.'); |
There was a problem hiding this comment.
As above, please include the link to add.
flutter/packages@d7ee75a...ac41376 2023-08-08 engine-flutter-autoroll@skia.org Roll Flutter from ad0aa8d to 436df69 (17 revisions) (flutter/packages#4663) 2023-08-08 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Repeatedly pump WebViews until one is garbage collected (flutter/packages#4662) 2023-08-08 erikgerman917@gmail.com [xdg_directories] Add example app (flutter/packages#4554) 2023-08-08 70025277+Nitin-Poojary@users.noreply.github.com [pigeon] Recursively create output target files (flutter/packages#4458) 2023-08-07 jpnurmi@gmail.com [path_provider] Add getApplicationCachePath() (flutter/packages#4483) 2023-08-07 10687576+bparrishMines@users.noreply.github.com [flutter_markdown] Adopt code excerpts in README (flutter/packages#4656) 2023-08-07 reidbaker@google.com [All] Expand artifact hub to all plugins (flutter/packages#4645) 2023-08-07 engine-flutter-autoroll@skia.org Roll Flutter from 2ba9f7b to ad0aa8d (31 revisions) (flutter/packages#4659) 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 flutter-ecosystem@google.com,rmistry@google.com 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter/issues/120119
Expansion of #4567
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.mdto add a description of the change, [following repository CHANGELOG style].///).