summaryrefslogtreecommitdiffstats
path: root/build/android/dex_action.gypi
blob: 9ea3e714d9b28862dd79ec33aed431f269b0769b (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
51
52
53
54
55
56
57
58
59
# Copyright 2013 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 an action to provide a rule that dexes
# compiled java files. If proguard_enabled == "true" and CONFIGURATION_NAME ==
# "Release", then it will dex the proguard_enabled_input_path instead of the
# normal dex_input_paths/dex_generated_input_paths.
#
# To use this, create a gyp target with the following form:
#  {
#    'action_name': 'some name for the action'
#    'actions': [
#      'variables': {
#        'dex_input_paths': [ 'files to dex (when proguard is not used) and add to input paths' ],
#        'dex_generated_input_dirs': [ 'dirs that contain generated files to dex' ],
#
#        # For targets that use proguard:
#        'proguard_enabled': 'true',
#        'proguard_enabled_input_path': 'path to dex when using proguard',
#      },
#      'includes': [ 'relative/path/to/dex_action.gypi' ],
#    ],
#  },
#

{
  'message': 'Creating dex file: <(output_path)',
  'variables': {
    'dex_input_paths': [],
    'dex_generated_input_dirs': [],
    'proguard_enabled%': 'false',
    'proguard_enabled_input_path%': '',
    'dex_no_locals%': 0,
    'dex_additional_options': [],
  },
  'inputs': [
    '<(DEPTH)/build/android/gyp/util/build_utils.py',
    '<(DEPTH)/build/android/gyp/util/md5_check.py',
    '<(DEPTH)/build/android/gyp/dex.py',
    '>@(dex_input_paths)',
  ],
  'outputs': [
    '<(output_path)',
    '<(output_path).inputs',
  ],
  'action': [
    'python', '<(DEPTH)/build/android/gyp/dex.py',
    '--dex-path=<(output_path)',
    '--android-sdk-tools=<(android_sdk_tools)',
    '--configuration-name=<(CONFIGURATION_NAME)',
    '--proguard-enabled=>(proguard_enabled)',
    '--proguard-enabled-input-path=<(proguard_enabled_input_path)',
    '--no-locals=>(dex_no_locals)',
    '>@(dex_additional_options)',
    '>@(dex_input_paths)',
    '>@(dex_generated_input_dirs)',
  ]
}