Roll WebRTC 8987:8989, Libjingle 8985:8990
[chromium-blink-merge.git] / ios / web / js_compile.gypi
blobdf195544151809a8c03250bbf5bc347c954998b8
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.
6   'variables': {
7     'closure_compiler_path': '<(DEPTH)/third_party/closure_compiler/compiler/compiler.jar',
8     'compile_javascript%': 1,
9   },
10   'conditions': [
11     ['compile_javascript==1', {
12       'rules': [
13         {
14           'rule_name': 'jscompilation',
15           'extension': 'js',
16           'inputs': [
17             '<(closure_compiler_path)',
18           ],
19           'outputs': [
20             '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
21           ],
22           'action': [
23             'java',
24             '-jar',
25             '<(closure_compiler_path)',
26             '--compilation_level',
27             'SIMPLE_OPTIMIZATIONS',
28             '--js',
29             '<(RULE_INPUT_PATH)',
30             '--js_output_file',
31             '<@(_outputs)',
32           ],
33           'message': 'Running closure compiler on <(RULE_INPUT_NAME)',
34         }  # rule_name: jscompilation
35       ]},
36      {  # else
37       'rules': [
38         {
39           'rule_name': 'jscompilation',
40           'extension': 'js',
41           'outputs': [
42             '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
43           ],
44           'action': [
45             'cp',
46             '<(RULE_INPUT_PATH)',
47             '<@(_outputs)',
48           ],
49         }
50       ]}  # rule_name: jscompilation
51     ]  # condition: compile_javascript
52   ]  # conditions