1// Copyright 2016 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5import '../base/file_system.dart'; 6import '../base/platform.dart'; 7import '../cache.dart'; 8 9/// Locate the Dart SDK. 10String get dartSdkPath { 11 return fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'dart-sdk'); 12} 13 14/// The required Dart language flags 15const List<String> dartVmFlags = <String>[]; 16 17/// Return the platform specific name for the given Dart SDK binary. So, `pub` 18/// ==> `pub.bat`. The default SDK location can be overridden with a specified 19/// [sdkLocation]. 20String sdkBinaryName(String name, { String sdkLocation }) { 21 return fs.path.absolute(fs.path.join(sdkLocation ?? dartSdkPath, 'bin', platform.isWindows ? '$name.bat' : name)); 22} 23