Revert "Reland "Exit on deprecated v1 embedding when trying to run or build (#92901)" (#93386)" (#93518)

This reverts commit eabb7cbc34.

It broke multiple tests.
This commit is contained in:
Yegor
2021-11-11 16:45:40 -08:00
committed by GitHub
parent d77bc51856
commit 24b9346c9b
31 changed files with 64 additions and 278 deletions

View File

@@ -181,8 +181,6 @@ abstract class FlutterCommand extends Command<void> {
bool _usesFatalWarnings = false;
DeprecationBehavior get deprecationBehavior => DeprecationBehavior.none;
bool get shouldRunPub => _usesPubOption && boolArg('pub');
bool get shouldUpdateCache => true;
@@ -836,15 +834,6 @@ abstract class FlutterCommand extends Command<void> {
);
}
void addIgnoreDeprecationOption({ bool hide = false }) {
argParser.addFlag('ignore-deprecation',
negatable: false,
help: 'Indicates that the app should ignore deprecation warnings and continue to build '
'using deprecated APIs. Use of this flag may cause your app to fail to build when '
'deprecated APIs are removed.',
);
}
/// Adds build options common to all of the desktop build commands.
void addCommonDesktopBuildOptions({ required bool verboseHelp }) {
addBuildModeFlags(verboseHelp: verboseHelp);
@@ -1274,10 +1263,8 @@ abstract class FlutterCommand extends Command<void> {
await validateCommand();
final FlutterProject project = FlutterProject.current();
project.checkForDeprecation(deprecationBehavior: deprecationBehavior);
if (shouldRunPub) {
final FlutterProject project = FlutterProject.current();
final Environment environment = Environment(
artifacts: globals.artifacts!,
logger: globals.logger,