OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'package:boolean_selector/boolean_selector.dart'; | 7 import 'package:boolean_selector/boolean_selector.dart'; |
8 import 'package:collection/collection.dart'; | 8 import 'package:collection/collection.dart'; |
9 import 'package:glob/glob.dart'; | 9 import 'package:glob/glob.dart'; |
10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 patterns: patterns, | 304 patterns: patterns, |
305 platforms: platforms, | 305 platforms: platforms, |
306 paths: paths, | 306 paths: paths, |
307 filename: filename, | 307 filename: filename, |
308 chosenPresets: chosenPresets, | 308 chosenPresets: chosenPresets, |
309 includeTags: includeTags, | 309 includeTags: includeTags, |
310 excludeTags: excludeTags, | 310 excludeTags: excludeTags, |
311 addTags: addTags, | 311 addTags: addTags, |
312 | 312 |
313 // Make sure we pass [chosenPresets] to the child configurations as | 313 // Make sure we pass [chosenPresets] to the child configurations as |
314 // well. This ensures that | 314 // well. This ensures that tags and platforms can have preset-specific |
| 315 // behavior. |
315 tags: _withChosenPresets(tags, chosenPresets), | 316 tags: _withChosenPresets(tags, chosenPresets), |
316 onPlatform: _withChosenPresets(onPlatform, chosenPresets), | 317 onPlatform: _withChosenPresets(onPlatform, chosenPresets), |
317 presets: _withChosenPresets(presets, chosenPresets)); | 318 presets: _withChosenPresets(presets, chosenPresets)); |
318 | 319 |
319 if (chosenPresets == null) return _unresolved(); | 320 if (chosenPresets == null) return _unresolved(); |
320 chosenPresets = new Set.from(chosenPresets); | 321 chosenPresets = new Set.from(chosenPresets); |
321 | 322 |
322 if (presets == null) return _unresolved(); | 323 if (presets == null) return _unresolved(); |
323 presets = new Map.from(presets); | 324 presets = new Map.from(presets); |
324 | 325 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 548 |
548 /// Merges two maps whose values are [Configuration]s. | 549 /// Merges two maps whose values are [Configuration]s. |
549 /// | 550 /// |
550 /// Any overlapping keys in the maps have their configurations merged in the | 551 /// Any overlapping keys in the maps have their configurations merged in the |
551 /// returned map. | 552 /// returned map. |
552 Map<Object, Configuration> _mergeConfigMaps(Map<Object, Configuration> map1, | 553 Map<Object, Configuration> _mergeConfigMaps(Map<Object, Configuration> map1, |
553 Map<Object, Configuration> map2) => | 554 Map<Object, Configuration> map2) => |
554 mergeMaps(map1, map2, | 555 mergeMaps(map1, map2, |
555 value: (config1, config2) => config1.merge(config2)); | 556 value: (config1, config2) => config1.merge(config2)); |
556 } | 557 } |
OLD | NEW |