Unverified Commit f86bdf1a authored by Jacob Richman's avatar Jacob Richman Committed by GitHub

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.
parent 8b0de38e
......@@ -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)
......
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