Index: pkg/analyzer_cli/lib/src/package_analyzer.dart |
diff --git a/pkg/analyzer_cli/lib/src/package_analyzer.dart b/pkg/analyzer_cli/lib/src/package_analyzer.dart |
index 51cacf2a13c421697a1a35e62f59265d221c6ef3..3b53b3f7e304315aaab8c1699cdf4bf12a66f672 100644 |
--- a/pkg/analyzer_cli/lib/src/package_analyzer.dart |
+++ b/pkg/analyzer_cli/lib/src/package_analyzer.dart |
@@ -15,6 +15,7 @@ import 'package:analyzer/src/context/cache.dart'; |
import 'package:analyzer/src/context/context.dart'; |
import 'package:analyzer/src/generated/engine.dart'; |
import 'package:analyzer/src/generated/error.dart'; |
+import 'package:analyzer/src/generated/java_io.dart'; |
import 'package:analyzer/src/generated/resolver.dart'; |
import 'package:analyzer/src/generated/sdk_io.dart'; |
import 'package:analyzer/src/generated/source.dart'; |
@@ -341,7 +342,8 @@ class PackageAnalyzer { |
} |
void _createContext() { |
- DirectoryBasedDartSdk sdk = DirectoryBasedDartSdk.defaultSdk; |
+ DirectoryBasedDartSdk sdk = |
+ new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); |
// Create the context. |
context = AnalysisEngine.instance.createAnalysisContext(); |