summaryrefslogtreecommitdiffstats
path: root/chromium/android_webview/build/jarjar_resources.gypi
blob: 17838c6a7674ecd3a8275590e967b56340aa20dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This file is meant to be included into a target to provide a rule
# to run the equivalent of jarjar on Java resources (layout.xml files).
#
# To use this, create a gyp target with the following form:
# {
#   'target_name': 'my-package_java',
#   'type': 'none',
#   'variables': {
#     'java_in_dir': 'path/to/package/root',
#   },
#   'includes': ['path/to/this/gypi/file'],
# }
#
# Required variables:
#  res_dir - The top-level resources folder.
#  rules_file - Path to the file containing jar-jar rules.

{
  'variables': {
    'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)',
    'jarjar_stamp': '<(intermediate_dir)/jarjar_resources.stamp',
    'resource_input_paths': ['<!@(find <(res_dir) -type f)'],
  },
  'actions': [{
      'action_name': 'jarjar resources',
      'message': 'Copying and jar-jaring resources for <(_target_name)',
      'variables': {
        'out_dir': '<(intermediate_dir)/jarjar_res',
      },
      'inputs': [
        '<(DEPTH)/build/android/gyp/util/build_utils.py',
        '<(DEPTH)/build/android/gyp/jarjar_resources.py',
        '>@(resource_input_paths)',
      ],
      'outputs': [
          '<(jarjar_stamp)',
      ],
      'action': [
        'python', '../build/android/gyp/jarjar_resources.py',
        '--input-dir', '<(res_dir)',
        '--output-dir', '<(out_dir)',
        '--rules-path', '<(rules_file)',
        '--stamp', '<(jarjar_stamp)',
      ]
  }],
}