OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
6 # to build Java in a consistent manner. | 6 # to build Java in a consistent manner. |
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 # 'target_name': 'my-package_java', | 10 # 'target_name': 'my-package_java', |
(...skipping 17 matching lines...) Expand all Loading... |
28 # <(PRODUCT_DIR)/lib.java/chromium_base.jar | 28 # <(PRODUCT_DIR)/lib.java/chromium_base.jar |
29 | 29 |
30 { | 30 { |
31 'direct_dependent_settings': { | 31 'direct_dependent_settings': { |
32 'variables': { | 32 'variables': { |
33 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar
'], | 33 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar
'], |
34 }, | 34 }, |
35 }, | 35 }, |
36 'variables': { | 36 'variables': { |
37 'input_jars_paths': [], | 37 'input_jars_paths': [], |
| 38 'additional_src_dirs': [], |
38 }, | 39 }, |
39 'actions': [ | 40 'actions': [ |
40 { | 41 { |
41 'action_name': 'ant_<(package_name)', | 42 'action_name': 'ant_<(package_name)', |
42 'message': 'Building <(package_name) java sources.', | 43 'message': 'Building <(package_name) java sources.', |
43 'inputs': [ | 44 'inputs': [ |
44 'android/ant/common.xml', | 45 'android/ant/common.xml', |
45 'android/ant/chromium-jars.xml', | 46 'android/ant/chromium-jars.xml', |
46 '<(java_in_dir)/<(package_name).xml', | 47 '<(java_in_dir)/<(package_name).xml', |
47 '<!@(find <(java_in_dir) -name "*.java")', | 48 '<!@(find <(java_in_dir) -name "*.java")', |
48 '>@(input_jars_paths)', | 49 '>@(input_jars_paths)', |
49 ], | 50 ], |
50 'outputs': [ | 51 'outputs': [ |
51 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar', | 52 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar', |
52 ], | 53 ], |
53 'action': [ | 54 'action': [ |
54 'ant', | 55 'ant', |
55 '-DPRODUCT_DIR=<(ant_build_out)', | 56 '-DPRODUCT_DIR=<(ant_build_out)', |
56 '-DPACKAGE_NAME=<(package_name)', | 57 '-DPACKAGE_NAME=<(package_name)', |
| 58 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
57 '-DANDROID_SDK=<(android_sdk)', | 59 '-DANDROID_SDK=<(android_sdk)', |
58 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 60 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
59 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', | 61 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
60 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | 62 '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
61 '-DANDROID_TOOLCHAIN=<(android_toolchain)', | 63 '-DANDROID_TOOLCHAIN=<(android_toolchain)', |
62 '-buildfile', | 64 '-buildfile', |
63 '<(java_in_dir)/<(package_name).xml', | 65 '<(java_in_dir)/<(package_name).xml', |
64 ] | 66 ] |
65 }, | 67 }, |
66 ], | 68 ], |
67 } | 69 } |
OLD | NEW |