Chromium Code Reviews| Index: editor/analyzer.gyp |
| =================================================================== |
| --- editor/analyzer.gyp (revision 0) |
| +++ editor/analyzer.gyp (revision 0) |
| @@ -0,0 +1,109 @@ |
| +# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| +# for details. All rights reserved. Use of this source code is governed by a |
| +# BSD-style license that can be found in the LICENSE file. |
| + |
| +{ |
| + 'variables' : { |
| + 'classpath_separator%': ':', |
| + }, |
| + 'conditions' : [ |
| + ['OS=="win"', { |
| + 'variables' : { |
| + 'classpath_separator': ';', |
| + }, |
| + }], |
| + ], |
| + 'targets': [ |
| + { |
| + 'target_name': 'analyzer', |
| + 'type': 'none', |
| + 'variables': { |
| + 'analyzer_name': 'new_analyzer', |
| + 'java_source_files': [ |
| + '<!@(["python", "../tools/list_files.py", "\\.java$", "tools/plugins/com.google.dart.command.analyze"])', |
| + '<!@(["python", "../tools/list_files.py", "\\.java$", "tools/plugins/com.google.dart.engine"])', |
| + ], |
| + # When changing the jar files that we depend on please change the list |
| + # below. |
| + 'dependent_jar_files': [ |
| + '../third_party/commons-lang/3.1/commons-lang3-3.1.jar', |
| + '../third_party/json/r2_20080312/json.jar', |
| + '../third_party/guava/r13/guava-13.0.1.jar', |
| + '../third_party/args4j/2.0.12/args4j-2.0.12.jar' |
| + ], |
| + # We simply rely on all the jar files being copied to the output dir. |
| + 'compilation_classpath': '<(PRODUCT_DIR)/<(analyzer_name)/*', |
| + # The file where we write the class path to be used in the manifest. |
| + 'class_path_file': '<(PRODUCT_DIR)/<(analyzer_name)/classpath_file', |
| + }, |
| + # Copy all the jar files we depend on to the output directory. |
| + 'copies': [ |
| + { |
| + 'destination': '<(PRODUCT_DIR)/<(analyzer_name)', |
|
ahe
2013/02/14 14:28:16
I don't think this is correct. I don't know how GY
ricow1
2013/02/14 15:40:20
Do you mean as in this will make it non-incrementa
ahe
2013/02/14 16:34:10
I agree. Sorry for the confusion.
However, I stil
|
| + 'files': [ |
| + '<@(dependent_jar_files)', |
| + ], |
| + } |
| + ], |
| + 'actions': [ |
| + { |
| + 'action_name': 'create_classpath_file', |
| + 'inputs': [ |
| + '<@(java_source_files)', |
| + '<@(dependent_jar_files)', |
| + ], |
| + 'outputs': [ |
| + '<(PRODUCT_DIR)/<(analyzer_name)/classpath_file', |
| + ], |
| + 'action': [ |
| + 'python', 'tools/write_class_path_file.py', |
| + '<(class_path_file)', |
| + '<(PRODUCT_DIR)/<(analyzer_name)', |
| + '<(analyzer_name)', |
| + ], |
| + 'message': 'Creating classpath file.', |
|
ahe
2013/02/14 14:28:16
I'd say:
'Creating <(_outputs)'
ricow1
2013/02/14 15:40:20
Done.
|
| + }, |
| + { |
| + 'action_name': 'create_analyzer', |
| + 'inputs': [ |
| + '<@(java_source_files)', |
| + '<@(dependent_jar_files)', |
| + ], |
| + 'outputs': [ |
| + '<(PRODUCT_DIR)/<(analyzer_name)/com', |
| + ], |
| + 'action': [ |
| + 'javac', |
|
ahe
2013/02/14 14:28:16
Specify -sourcepath, -source 6, -target 6, and -im
ricow1
2013/02/14 15:40:20
Done
ricow1
2013/02/14 15:40:20
As discussed offline, done and moved to a python s
|
| + '-d', '<(PRODUCT_DIR)/<(analyzer_name)/', |
| + '-cp', |
| + '<@(compilation_classpath)', |
| + '<@(java_source_files)', |
| + ], |
| + 'message': 'Creating analyzer.', |
|
ahe
2013/02/14 14:28:16
I'd use the same message as above.
ricow1
2013/02/14 15:40:20
Done.
|
| + }, |
| + { |
| + 'action_name': 'pack_analyzer', |
| + 'inputs': [ |
| + '<@(java_source_files)', |
| + '<@(dependent_jar_files)', |
| + '<(class_path_file)', |
| + '<(PRODUCT_DIR)/<(analyzer_name)/com', |
| + ], |
| + 'outputs': [ |
| + '<(PRODUCT_DIR)/<(analyzer_name).jar', |
| + ], |
| + 'action': [ |
| + 'jar', |
| + 'cfem', '<(PRODUCT_DIR)/<(analyzer_name).jar', |
| + 'com.google.dart.command.analyze.AnalyzerMain', |
| + '<(class_path_file)', |
| + '-C', '<(PRODUCT_DIR)/<(analyzer_name)/', 'com', |
| + ], |
| + 'message': 'Pack analyzer.', |
| + }, |
| + ], |
| + } |
| + ] |
| +} |
| + |
| + |