From 40cbdd11cd44872136dc1d170693cca1017f7bbf Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 21 Mar 2019 15:56:13 -0700 Subject: [PATCH] Use Dart version in script cache check (#29721) --- .../flutter_tools/lib/src/build_runner/build_runner.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/lib/src/build_runner/build_runner.dart b/packages/flutter_tools/lib/src/build_runner/build_runner.dart index 7207b8f96de..1684690e13c 100644 --- a/packages/flutter_tools/lib/src/build_runner/build_runner.dart +++ b/packages/flutter_tools/lib/src/build_runner/build_runner.dart @@ -18,6 +18,7 @@ import '../base/common.dart'; import '../base/file_system.dart'; import '../base/io.dart'; import '../base/logger.dart'; +import '../base/platform.dart'; import '../base/process_manager.dart'; import '../codegen.dart'; import '../dart/package_map.dart'; @@ -205,10 +206,12 @@ class _BuildRunnerCodegenDaemon implements CodegenDaemon { // Sorts the builders by name and produces a hashcode of the resulting iterable. List _produceScriptId(YamlMap builders) { if (builders == null || builders.isEmpty) { - return md5.convert([]).bytes; + return md5.convert(platform.version.codeUnits).bytes; } final List orderedBuilders = builders.keys .cast() .toList()..sort(); - return md5.convert(orderedBuilders.join('').codeUnits).bytes; + return md5.convert(orderedBuilders + .followedBy([platform.version]) + .join('').codeUnits).bytes; }