Unverified Commit e69a8a15 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

pass track widget creation flag through to build script (#31277)

parent b1039f0f
...@@ -66,6 +66,7 @@ class BuildLinuxCommand extends BuildSubCommand { ...@@ -66,6 +66,7 @@ class BuildLinuxCommand extends BuildSubCommand {
flutterProject.linux.buildScript.path, flutterProject.linux.buildScript.path,
Cache.flutterRoot, Cache.flutterRoot,
buildInfo.isDebug ? 'debug' : 'release', buildInfo.isDebug ? 'debug' : 'release',
buildInfo?.trackWidgetCreation == true ? 'track-widget-creation' : 'no-track-widget-creation',
], runInShell: true); ], runInShell: true);
process.stderr process.stderr
.transform(utf8.decoder) .transform(utf8.decoder)
......
...@@ -66,6 +66,7 @@ class BuildWindowsCommand extends BuildSubCommand { ...@@ -66,6 +66,7 @@ class BuildWindowsCommand extends BuildSubCommand {
flutterProject.windows.buildScript.path, flutterProject.windows.buildScript.path,
Cache.flutterRoot, Cache.flutterRoot,
buildInfo.isDebug ? 'debug' : 'release', buildInfo.isDebug ? 'debug' : 'release',
buildInfo?.trackWidgetCreation == true ? 'track-widget-creation' : 'no-track-widget-creation',
], runInShell: true); ], runInShell: true);
process.stderr process.stderr
.transform(utf8.decoder) .transform(utf8.decoder)
......
...@@ -18,6 +18,7 @@ Future<void> buildMacOS(FlutterProject flutterProject, BuildInfo buildInfo) asyn ...@@ -18,6 +18,7 @@ Future<void> buildMacOS(FlutterProject flutterProject, BuildInfo buildInfo) asyn
flutterProject.macos.buildScript.path, flutterProject.macos.buildScript.path,
Cache.flutterRoot, Cache.flutterRoot,
buildInfo?.isDebug == true ? 'debug' : 'release', buildInfo?.isDebug == true ? 'debug' : 'release',
buildInfo?.trackWidgetCreation == true ? 'track-widget-creation' : 'no-track-widget-creation',
], runInShell: true); ], runInShell: true);
final Status status = logger.startProgress( final Status status = logger.startProgress(
'Building macOS application...', 'Building macOS application...',
......
...@@ -59,6 +59,7 @@ void main() { ...@@ -59,6 +59,7 @@ void main() {
), throwsA(isInstanceOf<ToolExit>())); ), throwsA(isInstanceOf<ToolExit>()));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
Platform: () => notLinuxPlatform, Platform: () => notLinuxPlatform,
FileSystem: () => memoryFilesystem,
}); });
testUsingContext('Linux build invokes build script', () async { testUsingContext('Linux build invokes build script', () async {
...@@ -70,7 +71,8 @@ void main() { ...@@ -70,7 +71,8 @@ void main() {
when(mockProcessManager.start(<String>[ when(mockProcessManager.start(<String>[
'/linux/build.sh', '/linux/build.sh',
'/', '/',
'release' 'release',
'no-track-widget-creation',
], runInShell: true)).thenAnswer((Invocation invocation) async { ], runInShell: true)).thenAnswer((Invocation invocation) async {
return mockProcess; return mockProcess;
}); });
......
...@@ -71,6 +71,7 @@ void main() { ...@@ -71,6 +71,7 @@ void main() {
'/macos/build.sh', '/macos/build.sh',
'/', '/',
'release', 'release',
'no-track-widget-creation',
], runInShell: true)).thenAnswer((Invocation invocation) async { ], runInShell: true)).thenAnswer((Invocation invocation) async {
return mockProcess; return mockProcess;
}); });
......
...@@ -72,6 +72,7 @@ void main() { ...@@ -72,6 +72,7 @@ void main() {
r'C:\windows\build.bat', r'C:\windows\build.bat',
r'C:\', r'C:\',
'release', 'release',
'no-track-widget-creation',
], runInShell: true)).thenAnswer((Invocation invocation) async { ], runInShell: true)).thenAnswer((Invocation invocation) async {
return mockProcess; return mockProcess;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment