| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This file is meant to be included into an action to provide a rule that dexes | 5 # This file is meant to be included into an action to provide a rule that dexes |
| 6 # compiled java files. If proguard_enabled == "true" and CONFIGURATION_NAME == | 6 # compiled java files. If proguard_enabled == "true" and CONFIGURATION_NAME == |
| 7 # "Release", then it will dex the proguard_enabled_input_path instead of the | 7 # "Release", then it will dex the proguard_enabled_input_path instead of the |
| 8 # normal dex_input_paths/dex_generated_input_paths. | 8 # normal dex_input_paths/dex_generated_input_paths. |
| 9 # | 9 # |
| 10 # To use this, create a gyp target with the following form: | 10 # To use this, create a gyp target with the following form: |
| 11 # { | 11 # { |
| 12 # 'action_name': 'some name for the action' | 12 # 'action_name': 'some name for the action' |
| 13 # 'actions': [ | 13 # 'actions': [ |
| 14 # 'variables': { | 14 # 'variables': { |
| 15 # 'dex_input_paths': [ 'files to dex (when proguard is not used) and add
to input paths' ], | 15 # 'dex_input_paths': [ 'files to dex (when proguard is not used) and add
to input paths' ], |
| 16 # 'dex_generated_input_dirs': [ 'dirs that contain generated files to dex
' ], | 16 # 'dex_generated_input_dirs': [ 'dirs that contain generated files to dex
' ], |
| 17 # 'input_paths': [ 'additional files to be added to the list of inputs' ]
, | |
| 18 # | 17 # |
| 19 # # For targets that use proguard: | 18 # # For targets that use proguard: |
| 20 # 'proguard_enabled': 'true', | 19 # 'proguard_enabled': 'true', |
| 21 # 'proguard_enabled_input_path': 'path to dex when using proguard', | 20 # 'proguard_enabled_input_path': 'path to dex when using proguard', |
| 22 # }, | 21 # }, |
| 23 # 'includes': [ 'relative/path/to/dex_action.gypi' ], | 22 # 'includes': [ 'relative/path/to/dex_action.gypi' ], |
| 24 # ], | 23 # ], |
| 25 # }, | 24 # }, |
| 26 # | 25 # |
| 27 | 26 |
| 28 { | 27 { |
| 29 'message': 'Creating dex file: <(output_path)', | 28 'message': 'Creating dex file: <(output_path)', |
| 30 'variables': { | 29 'variables': { |
| 31 'dex_input_paths': [], | 30 'dex_input_paths': [], |
| 32 'dex_generated_input_dirs': [], | 31 'dex_generated_input_dirs': [], |
| 33 'input_paths': [], | |
| 34 'proguard_enabled%': 'false', | 32 'proguard_enabled%': 'false', |
| 35 'proguard_enabled_input_path%': '', | 33 'proguard_enabled_input_path%': '', |
| 36 'dex_no_locals%': 0, | 34 'dex_no_locals%': 0, |
| 37 }, | 35 }, |
| 38 'inputs': [ | 36 'inputs': [ |
| 39 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 37 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 40 '<(DEPTH)/build/android/gyp/util/md5_check.py', | 38 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
| 41 '<(DEPTH)/build/android/gyp/dex.py', | 39 '<(DEPTH)/build/android/gyp/dex.py', |
| 42 '>@(input_paths)', | |
| 43 '>@(dex_input_paths)', | 40 '>@(dex_input_paths)', |
| 44 ], | 41 ], |
| 45 'outputs': [ | 42 'outputs': [ |
| 46 '<(output_path)', | 43 '<(output_path)', |
| 47 ], | 44 ], |
| 48 'action': [ | 45 'action': [ |
| 49 'python', '<(DEPTH)/build/android/gyp/dex.py', | 46 'python', '<(DEPTH)/build/android/gyp/dex.py', |
| 50 '--dex-path=<(output_path)', | 47 '--dex-path=<(output_path)', |
| 51 '--android-sdk-tools=<(android_sdk_tools)', | 48 '--android-sdk-tools=<(android_sdk_tools)', |
| 52 '--configuration-name=<(CONFIGURATION_NAME)', | 49 '--configuration-name=<(CONFIGURATION_NAME)', |
| 53 '--proguard-enabled=<(proguard_enabled)', | 50 '--proguard-enabled=<(proguard_enabled)', |
| 54 '--proguard-enabled-input-path=<(proguard_enabled_input_path)', | 51 '--proguard-enabled-input-path=<(proguard_enabled_input_path)', |
| 55 '--no-locals=<(dex_no_locals)', | 52 '--no-locals=<(dex_no_locals)', |
| 56 | |
| 57 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. | |
| 58 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | |
| 59 | |
| 60 '>@(dex_input_paths)', | 53 '>@(dex_input_paths)', |
| 61 '>@(dex_generated_input_dirs)', | 54 '>@(dex_generated_input_dirs)', |
| 62 ] | 55 ] |
| 63 } | 56 } |
| OLD | NEW |