OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library generate.all; | 5 library generate.all; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
| 9 import 'package:analyzer/src/codegen/tools.dart'; |
9 import 'package:path/path.dart'; | 10 import 'package:path/path.dart'; |
10 | 11 |
11 import 'codegen_analysis_server.dart' as codegen_analysis_server; | 12 import 'codegen_analysis_server.dart' as codegen_analysis_server; |
12 import 'codegen_dart_protocol.dart' as codegen_dart_protocol; | 13 import 'codegen_dart_protocol.dart' as codegen_dart_protocol; |
13 import 'codegen_inttest_methods.dart' as codegen_inttest_methods; | 14 import 'codegen_inttest_methods.dart' as codegen_inttest_methods; |
14 import 'codegen_java_types.dart' as codegen_java_types; | 15 import 'codegen_java_types.dart' as codegen_java_types; |
15 import 'codegen_matchers.dart' as codegen_matchers; | 16 import 'codegen_matchers.dart' as codegen_matchers; |
16 import 'codegen_tools.dart'; | |
17 import 'to_html.dart' as to_html; | 17 import 'to_html.dart' as to_html; |
18 | 18 |
19 /** | 19 /** |
| 20 * Generate all targets |
| 21 */ |
| 22 main() { |
| 23 String script = Platform.script.toFilePath(windows: Platform.isWindows); |
| 24 String pkgPath = normalize(join(dirname(script), '..', '..')); |
| 25 GeneratedContent.generateAll(pkgPath, allTargets); |
| 26 } |
| 27 |
| 28 /** |
20 * Get a list of all generated targets. | 29 * Get a list of all generated targets. |
21 */ | 30 */ |
22 List<GeneratedContent> get allTargets { | 31 List<GeneratedContent> get allTargets { |
23 List<GeneratedContent> targets = <GeneratedContent>[]; | 32 List<GeneratedContent> targets = <GeneratedContent>[]; |
24 targets.add(codegen_analysis_server.target); | 33 targets.add(codegen_analysis_server.target); |
25 targets.add(codegen_dart_protocol.target); | 34 targets.add(codegen_dart_protocol.target); |
26 targets.add(codegen_java_types.targetDir); | 35 targets.add(codegen_java_types.targetDir); |
27 targets.add(codegen_inttest_methods.target); | 36 targets.add(codegen_inttest_methods.target); |
28 targets.add(codegen_matchers.target); | 37 targets.add(codegen_matchers.target); |
29 targets.add(to_html.target); | 38 targets.add(to_html.target); |
30 return targets; | 39 return targets; |
31 } | 40 } |
32 | |
33 /** | |
34 * Generate all targets | |
35 */ | |
36 main() { | |
37 String script = Platform.script.toFilePath(windows: Platform.isWindows); | |
38 Directory.current = new Directory(dirname(script)); | |
39 for (GeneratedContent generatedContent in allTargets) { | |
40 generatedContent.generate(); | |
41 } | |
42 } | |
OLD | NEW |