mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Always import our packages when analyzing.
This commit is contained in:
parent
2da6b1758c
commit
0a6b0f9b0b
@ -6,6 +6,7 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:den_api/den_api.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import '../artifacts.dart';
|
||||
@ -179,6 +180,18 @@ class AnalyzeCommand extends FlutterCommand {
|
||||
Map<String, String> packages = <String, String>{};
|
||||
bool hadInconsistentRequirements = false;
|
||||
for (Directory directory in pubSpecDirectories.map((path) => new Directory(path))) {
|
||||
String pubSpecYamlPath = path.join(directory.path, 'pubspec.yaml');
|
||||
File pubSpecYamlFile = new File(pubSpecYamlPath);
|
||||
if (pubSpecYamlFile.existsSync()) {
|
||||
Pubspec pubSpecYaml = await Pubspec.load(pubSpecYamlPath);
|
||||
String packageName = pubSpecYaml.name;
|
||||
String packagePath = path.normalize(path.absolute(path.join(directory.path, 'lib')));
|
||||
if (packages.containsKey(packageName) && packages[packageName] != packagePath) {
|
||||
logging.warning('Inconsistent requirements for $packageName; using $packagePath (and not ${packages[packageName]}).');
|
||||
hadInconsistentRequirements = true;
|
||||
}
|
||||
packages[packageName] = packagePath;
|
||||
}
|
||||
File dotPackages = new File(path.join(directory.path, '.packages'));
|
||||
if (dotPackages.existsSync()) {
|
||||
Map<String, String> dependencies = <String, String>{};
|
||||
|
@ -12,6 +12,7 @@ dependencies:
|
||||
archive: ^1.0.20
|
||||
args: ^0.13.0
|
||||
crypto: ^0.9.1
|
||||
den_api: ^0.1.0
|
||||
mustache4dart: ^1.0.0
|
||||
path: ^1.3.0
|
||||
stack_trace: ^1.4.0
|
||||
|
Loading…
Reference in New Issue
Block a user