@@ -29,12 +29,13 @@ final RegExp errorMatcher = RegExp(r'(?:(?:.*:\d+:\d+|clang):\s)?(fatal\s)?(?:er
2929Future <void > buildLinux (
3030 LinuxProject linuxProject,
3131 BuildInfo buildInfo, {
32- String ? target,
33- SizeAnalyzer ? sizeAnalyzer,
34- bool needCrossBuild = false ,
35- required TargetPlatform targetPlatform,
36- String targetSysroot = '/' ,
37- }) async {
32+ String ? target,
33+ SizeAnalyzer ? sizeAnalyzer,
34+ bool needCrossBuild = false ,
35+ required TargetPlatform targetPlatform,
36+ String targetSysroot = '/' ,
37+ required Logger logger,
38+ }) async {
3839 target ?? = 'lib/main.dart' ;
3940 if (! linuxProject.cmakeFile.existsSync ()) {
4041 throwToolExit ('No Linux desktop project configured. See '
@@ -43,7 +44,7 @@ Future<void> buildLinux(
4344 }
4445
4546 final List <ProjectMigrator > migrators = < ProjectMigrator > [
46- CmakeCustomCommandMigration (linuxProject, globals. logger),
47+ CmakeCustomCommandMigration (linuxProject, logger),
4748 ];
4849
4950 final ProjectMigration migration = ProjectMigration (migrators);
@@ -59,11 +60,11 @@ Future<void> buildLinux(
5960 environmentConfig['FLUTTER_ENGINE' ] = globals.fs.path.dirname (globals.fs.path.dirname (engineOutPath));
6061 environmentConfig['LOCAL_ENGINE' ] = localEngineInfo.localEngineName;
6162 }
62- writeGeneratedCmakeConfig (Cache .flutterRoot! , linuxProject, buildInfo, environmentConfig);
63+ writeGeneratedCmakeConfig (Cache .flutterRoot! , linuxProject, buildInfo, environmentConfig, logger );
6364
6465 createPluginSymlinks (linuxProject.parent);
6566
66- final Status status = globals. logger.startProgress (
67+ final Status status = logger.startProgress (
6768 'Building Linux application...' ,
6869 );
6970 try {
@@ -97,13 +98,13 @@ Future<void> buildLinux(
9798 .childDirectory ('.flutter-devtools' ), 'linux-code-size-analysis' , 'json' ,
9899 )..writeAsStringSync (jsonEncode (output));
99100 // This message is used as a sentinel in analyze_apk_size_test.dart
100- globals .printStatus (
101+ logger .printStatus (
101102 'A summary of your Linux bundle analysis can be found at: ${outputFile .path }' ,
102103 );
103104
104105 // DevTools expects a file path relative to the .flutter-devtools/ dir.
105106 final String relativeAppSizePath = outputFile.path.split ('.flutter-devtools/' ).last.trim ();
106- globals .printStatus (
107+ logger .printStatus (
107108 '\n To analyze your app size in Dart DevTools, run the following command:\n '
108109 'dart devtools --appSizeBase=$relativeAppSizePath '
109110 );
0 commit comments