-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Use inferred flutter version #5207
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
Merged
mctofu
merged 19 commits into
dependabot:main
from
sigurdm:use_preferred_flutter_version
Jun 13, 2022
Merged
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c5eb881
Infer the flutter version from pubspec.yaml
sigurdm 4841bee
Test of infer_sdk_versions tool
sigurdm a0d214e
Update pub/README.md
sigurdm f1149cb
lints
sigurdm 6ba8da1
Remove commented code
sigurdm 473fddc
merge to main
sigurdm 3f9cc76
Scoping
sigurdm c68388f
Work around https://github.com/flutter/flutter/issues/54014
sigurdm 9d368da
Actually use the flutter downloaded
sigurdm 7d43821
Typo
sigurdm a43dc29
Handle empty url given
sigurdm 37065ae
Pull fixtures from right location
sigurdm fbcf171
trailing newline in .gitignore
sigurdm d08618d
Delete stray files
sigurdm 65ebd08
Final newline in pubspec
sigurdm befa583
Typo
sigurdm be3113d
Typo
sigurdm a5f0c57
Typo
sigurdm d3fe6ce
Markdown formatting
sigurdm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,5 @@ | |
| /tmp | ||
| /dependabot-*.gem | ||
| Gemfile.lock | ||
| .dart_tool/ | ||
| .packages | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # Generated by pub | ||
| # See https://dart.dev/tools/pub/glossary#lockfile | ||
| packages: | ||
| args: | ||
| dependency: "direct main" | ||
| description: | ||
| name: args | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "2.3.1" | ||
| async: | ||
| dependency: transitive | ||
| description: | ||
| name: async | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "2.9.0" | ||
| collection: | ||
| dependency: "direct main" | ||
| description: | ||
| name: collection | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.16.0" | ||
| http: | ||
| dependency: "direct main" | ||
| description: | ||
| name: http | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "0.13.4" | ||
| http_parser: | ||
| dependency: transitive | ||
| description: | ||
| name: http_parser | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "4.0.1" | ||
| meta: | ||
| dependency: transitive | ||
| description: | ||
| name: meta | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.8.0" | ||
| path: | ||
| dependency: "direct main" | ||
| description: | ||
| name: path | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.8.2" | ||
| pub_semver: | ||
| dependency: "direct main" | ||
| description: | ||
| name: pub_semver | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "2.1.1" | ||
| source_span: | ||
| dependency: transitive | ||
| description: | ||
| name: source_span | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.9.0" | ||
| string_scanner: | ||
| dependency: transitive | ||
| description: | ||
| name: string_scanner | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.1.1" | ||
| term_glyph: | ||
| dependency: transitive | ||
| description: | ||
| name: term_glyph | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.2.0" | ||
| typed_data: | ||
| dependency: transitive | ||
| description: | ||
| name: typed_data | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.3.1" | ||
| yaml: | ||
| dependency: "direct main" | ||
| description: | ||
| name: yaml | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "3.1.1" | ||
| sdks: | ||
| dart: ">=2.16.0 <3.0.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: helpers | ||
| environment: | ||
| sdk: '>=2.16.0 <3.0.0' | ||
|
|
||
| dependencies: | ||
| path: ^1.8.2 | ||
| yaml: ^3.1.1 | ||
| args: ^2.3.1 | ||
| collection: ^1.16.0 | ||
| pub_semver: ^2.1.1 | ||
| http: ^0.13.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| /// Support for automated upgrades. | ||
| library dependency_services; | ||
|
|
||
| import 'dart:async'; | ||
|
|
||
| import 'package:args/args.dart'; | ||
| import 'package:args/command_runner.dart'; | ||
| import 'package:pub/src/command.dart'; | ||
| import 'package:pub/src/command/dependency_services.dart'; | ||
| import 'package:pub/src/exit_codes.dart' as exit_codes; | ||
| import 'package:pub/src/io.dart'; | ||
| import 'package:pub/src/log.dart' as log; | ||
|
|
||
| class _DependencyServicesCommandRunner extends CommandRunner<int> | ||
| implements PubTopLevel { | ||
| @override | ||
| String? get directory => argResults['directory']; | ||
|
|
||
| @override | ||
| bool get captureStackChains => argResults['verbose']; | ||
|
|
||
| @override | ||
| bool get trace => argResults['verbose']; | ||
|
|
||
| ArgResults? _argResults; | ||
|
|
||
| /// The top-level options parsed by the command runner. | ||
| @override | ||
| ArgResults get argResults { | ||
| final a = _argResults; | ||
| if (a == null) { | ||
| throw StateError( | ||
| 'argResults cannot be used before Command.run is called.'); | ||
| } | ||
| return a; | ||
| } | ||
|
|
||
| _DependencyServicesCommandRunner() | ||
| : super('dependency_services', 'Support for automatic upgrades', | ||
| usageLineLength: lineLength) { | ||
| argParser.addFlag('verbose', | ||
| abbr: 'v', negatable: false, help: 'Shortcut for "--verbosity=all".'); | ||
| argParser.addOption( | ||
| 'directory', | ||
| abbr: 'C', | ||
| help: 'Run the subcommand in the directory<dir>.', | ||
| defaultsTo: '.', | ||
| valueHelp: 'dir', | ||
| ); | ||
|
|
||
| addCommand(DependencyServicesListCommand()); | ||
| addCommand(DependencyServicesReportCommand()); | ||
| addCommand(DependencyServicesApplyCommand()); | ||
| } | ||
|
|
||
| @override | ||
| Future<int> run(Iterable<String> args) async { | ||
| try { | ||
| _argResults = parse(args); | ||
| return await runCommand(argResults) ?? exit_codes.SUCCESS; | ||
| } on UsageException catch (error) { | ||
| log.exception(error); | ||
| return exit_codes.USAGE; | ||
| } | ||
| } | ||
|
|
||
| @override | ||
| void printUsage() { | ||
| log.message(usage); | ||
| } | ||
|
|
||
| @override | ||
| log.Verbosity get verbosity => log.Verbosity.normal; | ||
| } | ||
|
|
||
| Future<void> main(List<String> arguments) async { | ||
| await flushThenExit(await _DependencyServicesCommandRunner().run(arguments)); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.