Skip to content

Commit

Permalink
Fix boolean flag parsing in gradle. Track 'trackWidgetCreation' as pr…
Browse files Browse the repository at this point in the history
…operty of the build. (flutter#16901)
  • Loading branch information
aam authored Apr 24, 2018
1 parent c7ee37a commit a21c93d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/flutter_tools/gradle/flutter.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class FlutterPlugin implements Plugin<Project> {

Boolean previewDart2Value = false
if (project.hasProperty('preview-dart-2')) {
previewDart2Value = project.property('preview-dart-2')
previewDart2Value = project.property('preview-dart-2').toBoolean()
}
String[] fileSystemRootsValue = null
if (project.hasProperty('filesystem-roots')) {
Expand All @@ -270,8 +270,9 @@ class FlutterPlugin implements Plugin<Project> {
}
Boolean trackWidgetCreationValue = false
if (project.hasProperty('track-widget-creation')) {
trackWidgetCreationValue = project.property('track-widget-creation')
trackWidgetCreationValue = project.property('track-widget-creation').toBoolean()
}

String extraFrontEndOptionsValue = null
if (project.hasProperty('extra-front-end-options')) {
extraFrontEndOptionsValue = project.property('extra-front-end-options')
Expand All @@ -282,7 +283,7 @@ class FlutterPlugin implements Plugin<Project> {
}
Boolean preferSharedLibraryValue = false
if (project.hasProperty('prefer-shared-library')) {
preferSharedLibraryValue = project.property('prefer-shared-library')
preferSharedLibraryValue = project.property('prefer-shared-library').toBoolean()
}
String targetPlatformValue = null
if (project.hasProperty('target-platform')) {
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_tools/lib/src/bundle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Future<void> build({
..add(mainPath);
final Map<String, String> properties = <String, String>{
'entryPoint': mainPath,
'trackWidgetCreation': trackWidgetCreation.toString(),
};
return new Fingerprint.fromBuildInputs(properties, compilerInputPaths);
}
Expand Down

0 comments on commit a21c93d

Please sign in to comment.