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

This commit is contained in:
Jonah Williams 2019-04-18 15:03:34 -07:00 committed by GitHub
parent b1039f0f1b
commit e69a8a15b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 1 deletions

View file

@ -66,6 +66,7 @@ class BuildLinuxCommand extends BuildSubCommand {
flutterProject.linux.buildScript.path,
Cache.flutterRoot,
buildInfo.isDebug ? 'debug' : 'release',
buildInfo?.trackWidgetCreation == true ? 'track-widget-creation' : 'no-track-widget-creation',
], runInShell: true);
process.stderr
.transform(utf8.decoder)

View file

@ -66,6 +66,7 @@ class BuildWindowsCommand extends BuildSubCommand {
flutterProject.windows.buildScript.path,
Cache.flutterRoot,
buildInfo.isDebug ? 'debug' : 'release',
buildInfo?.trackWidgetCreation == true ? 'track-widget-creation' : 'no-track-widget-creation',
], runInShell: true);
process.stderr
.transform(utf8.decoder)

View file

@ -18,6 +18,7 @@ Future<void> buildMacOS(FlutterProject flutterProject, BuildInfo buildInfo) asyn
flutterProject.macos.buildScript.path,
Cache.flutterRoot,
buildInfo?.isDebug == true ? 'debug' : 'release',
buildInfo?.trackWidgetCreation == true ? 'track-widget-creation' : 'no-track-widget-creation',
], runInShell: true);
final Status status = logger.startProgress(
'Building macOS application...',

View file

@ -59,6 +59,7 @@ void main() {
), throwsA(isInstanceOf<ToolExit>()));
}, overrides: <Type, Generator>{
Platform: () => notLinuxPlatform,
FileSystem: () => memoryFilesystem,
});
testUsingContext('Linux build invokes build script', () async {
@ -70,7 +71,8 @@ void main() {
when(mockProcessManager.start(<String>[
'/linux/build.sh',
'/',
'release'
'release',
'no-track-widget-creation',
], runInShell: true)).thenAnswer((Invocation invocation) async {
return mockProcess;
});

View file

@ -71,6 +71,7 @@ void main() {
'/macos/build.sh',
'/',
'release',
'no-track-widget-creation',
], runInShell: true)).thenAnswer((Invocation invocation) async {
return mockProcess;
});

View file

@ -72,6 +72,7 @@ void main() {
r'C:\windows\build.bat',
r'C:\',
'release',
'no-track-widget-creation',
], runInShell: true)).thenAnswer((Invocation invocation) async {
return mockProcess;
});