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
|
String[] fileSystemRoots
|
||||||
@Optional @Input
|
@Optional @Input
|
||||||
String fileSystemScheme
|
String fileSystemScheme
|
||||||
@Optional @Input
|
@Input
|
||||||
Boolean trackWidgetCreation
|
Boolean trackWidgetCreation
|
||||||
@Optional @Input
|
@Optional @Input
|
||||||
String compilationTraceFilePath
|
String compilationTraceFilePath
|
||||||
|
@ -365,8 +365,8 @@ Future<void> _buildGradleProjectV2(
|
|||||||
if (target != null) {
|
if (target != null) {
|
||||||
command.add('-Ptarget=$target');
|
command.add('-Ptarget=$target');
|
||||||
}
|
}
|
||||||
if (buildInfo.trackWidgetCreation)
|
assert(buildInfo.trackWidgetCreation != null);
|
||||||
command.add('-Ptrack-widget-creation=true');
|
command.add('-Ptrack-widget-creation=${buildInfo.trackWidgetCreation}');
|
||||||
if (buildInfo.compilationTraceFilePath != null)
|
if (buildInfo.compilationTraceFilePath != null)
|
||||||
command.add('-Pprecompile=${buildInfo.compilationTraceFilePath}');
|
command.add('-Pprecompile=${buildInfo.compilationTraceFilePath}');
|
||||||
if (buildInfo.buildHotUpdate)
|
if (buildInfo.buildHotUpdate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user