mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
pass track widget creation flag through to build script (#31277)
This commit is contained in:
parent
b1039f0f1b
commit
e69a8a15b3
|
@ -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 {
|
||||||
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
|
||||||
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() {
|
||||||
), 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() {
|
||||||
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() {
|
||||||
'/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() {
|
||||||
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;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue