Roll src/third_party/skia a6ae14e:85693c1
[chromium-blink-merge.git] / ios / web / js_compile.gypi
blobaae69e6d5a88eea9c5141927722b60f0b61dbd77
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # This file should be deprecated in favor of js_compile_checked.gypi or
6 # eventually third_party/closure_compiler/compile_js.gypi as iOS JS code
7 # becomes error free. See http://crbug.com/487804
9   'variables': {
10     'closure_compiler_path': '<(DEPTH)/third_party/closure_compiler/compiler/compiler.jar',
11     'compile_javascript%': 1,
12   },
13   'conditions': [
14     ['compile_javascript==1', {
15       'rules': [
16         {
17           'rule_name': 'jscompilation',
18           'extension': 'js',
19           'inputs': [
20             '<(closure_compiler_path)',
21           ],
22           'outputs': [
23             '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
24           ],
25           'action': [
26             'java',
27             '-jar',
28             '<(closure_compiler_path)',
29             '--compilation_level',
30             'SIMPLE_OPTIMIZATIONS',
31             '--js',
32             '<(RULE_INPUT_PATH)',
33             '--js_output_file',
34             '<@(_outputs)',
35           ],
36           'message': 'Running closure compiler on <(RULE_INPUT_NAME)',
37         }  # rule_name: jscompilation
38       ]},
39      {  # else
40       'rules': [
41         {
42           'rule_name': 'jscompilation',
43           'extension': 'js',
44           'outputs': [
45             '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
46           ],
47           'action': [
48             'cp',
49             '<(RULE_INPUT_PATH)',
50             '<@(_outputs)',
51           ],
52         }
53       ]}  # rule_name: jscompilation
54     ]  # condition: compile_javascript
55   ]  # conditions