| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /// This library generates Mojo bindings for a Dart package. | 5 /// This library generates Mojo bindings for a Dart package. |
| 6 | 6 |
| 7 library generate; | 7 library generate; |
| 8 | 8 |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:collection'; |
| 10 import 'dart:convert'; | 11 import 'dart:convert'; |
| 11 import 'dart:developer' as dev; | 12 import 'dart:developer' as dev; |
| 12 import 'dart:io'; | 13 import 'dart:io'; |
| 13 | 14 |
| 14 import 'package:mojom/src/utils.dart'; | 15 import 'package:mojom/src/utils.dart'; |
| 15 import 'package:path/path.dart' as path; | 16 import 'package:path/path.dart' as path; |
| 17 import 'package:yaml/yaml.dart' as yaml; |
| 16 | 18 |
| 17 part 'mojom_finder.dart'; | 19 part 'mojom_finder.dart'; |
| 18 | 20 |
| 19 const String mojoTestPackage = '_mojo_for_test_only'; | 21 const String mojoTestPackage = '_mojo_for_test_only'; |
| 20 | 22 |
| 21 class MojomGenerator { | 23 class MojomGenerator { |
| 22 static dev.Counter _genMs; | 24 static dev.Counter _genMs; |
| 23 final bool _errorOnDuplicate; | 25 final bool _errorOnDuplicate; |
| 24 final bool _dryRun; | 26 final bool _dryRun; |
| 25 final bool _force; | 27 final bool _force; |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 '\t$dart $packRoot $scriptPath single -m $mojoSdk -r $root ' | 448 '\t$dart $packRoot $scriptPath single -m $mojoSdk -r $root ' |
| 447 '-p $packagePath $skips'); | 449 '-p $packagePath $skips'); |
| 448 _errors++; | 450 _errors++; |
| 449 return; | 451 return; |
| 450 } | 452 } |
| 451 } | 453 } |
| 452 } | 454 } |
| 453 | 455 |
| 454 bool _shouldSkip(File f) => containsPrefix(f.path, _skip); | 456 bool _shouldSkip(File f) => containsPrefix(f.path, _skip); |
| 455 } | 457 } |
| OLD | NEW |