-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asset graph path is now based on script uri
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
import 'dart:io'; | ||
|
||
import 'package:crypto/crypto.dart'; | ||
|
||
/// Relative path to the asset graph from the root package dir. | ||
const assetGraphPath = '$cacheDir/asset_graph.json'; | ||
final assetGraphPath = '$cacheDir/${scriptHash}/asset_graph.json'; | ||
|
||
/// Relative path to the cache directory from the root package dir. | ||
const cacheDir = '.dart_tool/build'; | ||
|
||
final String scriptHash = () { | ||
var hasher = new MD5(); | ||
hasher.add(Platform.script.path.codeUnits); | ||
return CryptoUtils.bytesToHex(hasher.close()); | ||
}(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters