mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix bug where gradle build rule would rerun on switching from (#23183)
--track-widget-creation=false to --track-widget-creation=true but not when switching from --track-widget-creation=true to --track-widget-creation=false due to the surprising behavior of Gradle @Optional inputs.
This commit is contained in:
parent
8b0de38ef8
commit
f86bdf1aa2
@ -418,7 +418,7 @@ abstract class BaseFlutterTask extends DefaultTask {
|
||||
String[] fileSystemRoots
|
||||
@Optional @Input
|
||||
String fileSystemScheme
|
||||
@Optional @Input
|
||||
@Input
|
||||
Boolean trackWidgetCreation
|
||||
@Optional @Input
|
||||
String compilationTraceFilePath
|
||||
|
@ -365,8 +365,8 @@ Future<void> _buildGradleProjectV2(
|
||||
if (target != null) {
|
||||
command.add('-Ptarget=$target');
|
||||
}
|
||||
if (buildInfo.trackWidgetCreation)
|
||||
command.add('-Ptrack-widget-creation=true');
|
||||
assert(buildInfo.trackWidgetCreation != null);
|
||||
command.add('-Ptrack-widget-creation=${buildInfo.trackWidgetCreation}');
|
||||
if (buildInfo.compilationTraceFilePath != null)
|
||||
command.add('-Pprecompile=${buildInfo.compilationTraceFilePath}');
|
||||
if (buildInfo.buildHotUpdate)
|
||||
|
Loading…
Reference in New Issue
Block a user