| 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:path/path.dart'; | 9 import 'package:path/path.dart'; |
| 10 | 10 |
| 11 import 'codegen_tools.dart'; | 11 import 'codegen_tools.dart'; |
| 12 import 'codegen_analysis_server.dart' as codegen_analysis_server; | 12 import 'codegen_analysis_server.dart' as codegen_analysis_server; |
| 13 import 'codegen_java_types.dart' as codegen_java_types; |
| 13 import 'codegen_inttest_methods.dart' as codegen_inttest_methods; | 14 import 'codegen_inttest_methods.dart' as codegen_inttest_methods; |
| 14 import 'codegen_matchers.dart' as codegen_matchers; | 15 import 'codegen_matchers.dart' as codegen_matchers; |
| 15 import 'to_html.dart' as to_html; | 16 import 'to_html.dart' as to_html; |
| 16 | 17 |
| 17 /** | 18 /** |
| 18 * Get a list of all generated targets. | 19 * Get a list of all generated targets. |
| 19 */ | 20 */ |
| 20 List<GeneratedFile> get allTargets { | 21 List<GeneratedContent> get allTargets { |
| 21 List<GeneratedFile> targets = <GeneratedFile>[]; | 22 List<GeneratedContent> targets = <GeneratedContent>[]; |
| 22 targets.add(codegen_analysis_server.target); | 23 targets.add(codegen_analysis_server.target); |
| 24 targets.add(codegen_java_types.targetDir); |
| 23 targets.add(codegen_inttest_methods.target); | 25 targets.add(codegen_inttest_methods.target); |
| 24 targets.add(codegen_matchers.target); | 26 targets.add(codegen_matchers.target); |
| 25 targets.add(to_html.target); | 27 targets.add(to_html.target); |
| 26 return targets; | 28 return targets; |
| 27 } | 29 } |
| 28 | 30 |
| 29 /** | 31 /** |
| 30 * Generate all targets | 32 * Generate all targets |
| 31 */ | 33 */ |
| 32 main() { | 34 main() { |
| 33 String script = Platform.script.toFilePath(windows: Platform.isWindows); | 35 String script = Platform.script.toFilePath(windows: Platform.isWindows); |
| 34 Directory.current = new Directory(dirname(script)); | 36 Directory.current = new Directory(dirname(script)); |
| 35 for (GeneratedFile generatedFile in allTargets) { | 37 for (GeneratedContent generatedContent in allTargets) { |
| 36 generatedFile.generate(); | 38 generatedContent.generate(); |
| 37 } | 39 } |
| 38 } | 40 } |
| OLD | NEW |