Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: editor/analyzer.gyp

Issue 12262040: Add support for building the new analyzer using gyp. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart.gyp ('k') | editor/tools/compile_analyzer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/analyzer.gyp
===================================================================
--- editor/analyzer.gyp (revision 0)
+++ editor/analyzer.gyp (revision 0)
@@ -0,0 +1,95 @@
+# 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': {
+ 'analyzer_name': 'new_analyzer',
+ # 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'
+ ],
+ },
+ 'targets': [
+ {
+ 'target_name': 'analyzer',
+ 'type': 'none',
+ 'dependencies': [
+ 'copy_jars',
+ ],
+ 'variables': {
+ '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"])',
+ ],
+ # We simply rely on all the jar files being copied to the output dir.
+ 'compilation_classpath': '<(PRODUCT_DIR)/<(analyzer_name)/*',
ahe 2013/02/19 10:38:38 This means that you expect that the files have bee
ricow1 2013/02/19 10:44:48 I don't expect that, it does not matter, we just r
ricow1 2013/02/19 10:45:58 Yeah, I see why, sorry, will fix
+ # The file where we write the class path to be used in the manifest.
+ 'class_path_file': '<(PRODUCT_DIR)/<(analyzer_name)/classpath_file',
+ },
+ 'actions': [
+ {
+ 'action_name': 'create_classpath_file',
+ 'inputs': [
+ '<@(java_source_files)',
ahe 2013/02/19 10:38:38 I don't understand this input.
ricow1 2013/02/19 10:44:48 Done, that is _not_ a input for this
+ '<@(dependent_jar_files)',
+ 'tools/write_class_path_file.py'
+ ],
+ '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 <(_outputs).',
+ },
+ {
+ 'action_name': 'create_analyzer',
+ 'inputs': [
+ '<@(java_source_files)',
+ '<@(dependent_jar_files)',
+ '<(PRODUCT_DIR)/<(analyzer_name)/classpath_file',
+ 'tools/compile_analyzer.py',
+ ],
+ 'outputs': [
+ <(PRODUCT_DIR)/<(analyzer_name).jar,
+ ],
+ 'action': [
+ 'python',
+ 'tools/compile_analyzer.py',
+ '--output_dir', '<(PRODUCT_DIR)/<(analyzer_name)/',
+ '--class_path', '<@(compilation_classpath)',
+ '--jar_file', '<(PRODUCT_DIR)/<(analyzer_name).jar',
+ '--jar_entry_directory', 'com',
+ '--entry_point', 'com.google.dart.command.analyze.AnalyzerMain',
+ '--class_path_file', '<(PRODUCT_DIR)/<(analyzer_name)/classpath_file',
+ '<@(java_source_files)',
+ ],
+ 'message': 'Creating <(_outputs).',
+ },
+ ],
+ },
+ {
+ 'target_name': 'copy_jars',
+ 'type': 'none',
+ # Copy all the jar files we depend on to the output directory.
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/<(analyzer_name)',
+ 'files': [
+ '<@(dependent_jar_files)',
+ ],
+ }
+ ],
+ }
+ ]
+}
+
+
« no previous file with comments | « dart.gyp ('k') | editor/tools/compile_analyzer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698