|
3 | 3 | // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
|
5 | 5 | import 'dart:convert'; |
6 | | -import 'dart:io' show Process; |
7 | 6 |
|
8 | 7 | import 'package:file/file.dart'; |
9 | 8 | import 'package:graphs/graphs.dart' as graphs; |
@@ -39,21 +38,8 @@ class NativeAssetsBuildPlanner { |
39 | 38 | final packageGraphJsonFile = fileSystem.file( |
40 | 39 | packageConfigUri.resolve('package_graph.json'), |
41 | 40 | ); |
42 | | - final String packageGraphJson; |
43 | | - if (packageGraphJsonFile.existsSync()) { |
44 | | - packageGraphJson = await packageGraphJsonFile.readAsString(); |
45 | | - } else { |
46 | | - // TODO: Either bump SDK constraint to dev release (but we can't while |
47 | | - // flutter_tools requires published stable packages). Or wait for Dart 3.8 |
48 | | - // to be released to remove this fallback. |
49 | | - final workingDirectory = packageConfigUri.resolve('../'); |
50 | | - final result = await Process.run( |
51 | | - dartExecutable.toFilePath(), |
52 | | - ['pub', 'deps', '--json'], |
53 | | - workingDirectory: workingDirectory.toFilePath(), |
54 | | - ); |
55 | | - packageGraphJson = result.stdout as String; |
56 | | - } |
| 41 | + assert(packageGraphJsonFile.existsSync()); |
| 42 | + final packageGraphJson = await packageGraphJsonFile.readAsString(); |
57 | 43 | final packageGraph = PackageGraph.fromPackageGraphJsonString( |
58 | 44 | packageGraphJson, |
59 | 45 | ); |
|
0 commit comments