| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 | 5 # This file is meant to be included into an action to provide a rule that |
| 6 # generates a list of classes that must be kept in the main dex file. | 6 # generates a list of classes that must be kept in the main dex file. |
| 7 # | 7 # |
| 8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
| 9 # { | 9 # { |
| 10 # 'action_name': 'some name for the action' | 10 # 'action_name': 'some name for the action' |
| 11 # 'actions': [ | 11 # 'actions': [ |
| 12 # 'variables': { | 12 # 'variables': { |
| 13 # 'jar_path': 'path to jar', | 13 # 'jar_paths': ['path to jar', ...], |
| 14 # 'output_path': 'output path' | 14 # 'output_path': 'output path', |
| 15 # }, | 15 # }, |
| 16 # 'includes': [ 'relative/path/to/main_dex_action.gypi' ], | 16 # 'includes': [ 'relative/path/to/main_dex_action.gypi' ], |
| 17 # ], | 17 # ], |
| 18 # }, | 18 # }, |
| 19 # | 19 # |
| 20 | 20 |
| 21 { | 21 { |
| 22 'message': 'Generating main dex classes list for <(jar_path)', | 22 'message': 'Generating main dex classes list for <(jar_path)', |
| 23 'variables': { | 23 'variables': { |
| 24 'jar_paths%': [], | 24 'jar_paths%': [], |
| 25 'output_path%': '', | 25 'output_path%': '', |
| 26 'main_dex_list_script': '<(DEPTH)/build/android/gyp/main_dex_list.py', | 26 'main_dex_list_script': '<(DEPTH)/build/android/gyp/main_dex_list.py', |
| 27 'main_dex_rules_path': '<(DEPTH)/build/android/main_dex_classes.flags', | 27 'main_dex_rules_path': '<(DEPTH)/build/android/main_dex_classes.flags', |
| 28 }, | 28 }, |
| 29 'inputs': [ | 29 'inputs': [ |
| 30 '<(jar_path)', | 30 '<@(jar_paths)', |
| 31 '<(main_dex_list_script)', | 31 '<(main_dex_list_script)', |
| 32 '<(main_dex_rules_path)', | 32 '<(main_dex_rules_path)', |
| 33 '<(multidex_configuration_path)', | 33 '<(multidex_configuration_path)', |
| 34 ], | 34 ], |
| 35 'outputs': [ | 35 'outputs': [ |
| 36 '<(output_path)', | 36 '<(output_path)', |
| 37 ], | 37 ], |
| 38 'action': [ | 38 'action': [ |
| 39 'python', '<(main_dex_list_script)', | 39 'python', '<(main_dex_list_script)', |
| 40 '--main-dex-list-path', '<(output_path)', | 40 '--main-dex-list-path', '<(output_path)', |
| 41 '--android-sdk-tools', '<(android_sdk_tools)', | 41 '--android-sdk-tools', '<(android_sdk_tools)', |
| 42 '--main-dex-rules-path', '<(main_dex_rules_path)', | 42 '--main-dex-rules-path', '<(main_dex_rules_path)', |
| 43 '--multidex-configuration-path', '<(multidex_configuration_path)', | 43 '--multidex-configuration-path', '<(multidex_configuration_path)', |
| 44 '<@(jar_paths)', | 44 '<@(jar_paths)', |
| 45 ] | 45 ] |
| 46 } | 46 } |
| OLD | NEW |