File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
+ import 'dart:io' ;
5
+
6
+ import 'package:crypto/crypto.dart' ;
4
7
5
8
/// Relative path to the asset graph from the root package dir.
6
- const assetGraphPath = '$cacheDir /asset_graph.json' ;
9
+ final assetGraphPath = '$cacheDir /${ scriptHash } /asset_graph.json' ;
7
10
8
11
/// Relative path to the cache directory from the root package dir.
9
12
const cacheDir = '.dart_tool/build' ;
13
+
14
+ final String scriptHash = () {
15
+ var hasher = new MD5 ();
16
+ hasher.add (Platform .script.path.codeUnits);
17
+ return CryptoUtils .bytesToHex (hasher.close ());
18
+ }();
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ dependencies:
11
11
analyzer : ^0.27.1
12
12
barback : ^0.15.0
13
13
code_transformers : ^0.4.1
14
+ crypto : 0.9.1
14
15
logging : ^0.11.2
15
16
glob : ^1.1.0
16
17
path : ^1.1.0
You can’t perform that action at this time.
0 commit comments