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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 'additional_R_files': [], | 66 'additional_R_files': [], |
67 'has_java_resources%': 0, | 67 'has_java_resources%': 0, |
68 }, | 68 }, |
69 'conditions': [ | 69 'conditions': [ |
70 ['has_java_resources == 1', { | 70 ['has_java_resources == 1', { |
71 'variables': { | 71 'variables': { |
72 'res_dir': '<(java_in_dir)/res', | 72 'res_dir': '<(java_in_dir)/res', |
73 'crunched_res_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/res', | 73 'crunched_res_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/res', |
74 'R_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/java_R', | 74 'R_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/java_R', |
75 'R_file': '<(R_dir)/<(R_package_relpath)/R.java', | 75 'R_file': '<(R_dir)/<(R_package_relpath)/R.java', |
| 76 'R_text_file': '<(R_dir)/R.txt', |
76 'generated_src_dirs': ['<(R_dir)'], | 77 'generated_src_dirs': ['<(R_dir)'], |
77 'additional_input_paths': ['<(R_file)'], | 78 'additional_input_paths': ['<(R_file)'], |
78 }, | 79 }, |
79 'all_dependent_settings': { | 80 'all_dependent_settings': { |
80 'variables': { | 81 'variables': { |
81 # Dependent jars include this target's R.java file via | 82 # Dependent jars include this target's R.java file via |
82 # generated_R_dirs and additional_R_files. | 83 # generated_R_dirs and additional_R_files. |
83 'generated_R_dirs': ['<(R_dir)'], | 84 'generated_R_dirs': ['<(R_dir)'], |
84 'additional_R_files': ['<(R_file)'], | 85 'additional_R_files': ['<(R_file)'], |
| 86 'additional_R_text_files': ['<(R_text_file)'], |
85 | 87 |
86 # Dependent APKs include this target's resources via | 88 # Dependent APKs include this target's resources via |
87 # additional_res_dirs and additional_res_packages. | 89 # additional_res_dirs and additional_res_packages. |
88 'additional_res_dirs': ['<(crunched_res_dir)', '<(res_dir)'], | 90 'additional_res_dirs': ['<(crunched_res_dir)', '<(res_dir)'], |
89 'additional_res_packages': ['<(R_package)'], | 91 'additional_res_packages': ['<(R_package)'], |
90 }, | 92 }, |
91 }, | 93 }, |
92 'actions': [ | 94 'actions': [ |
93 # Generate R.java and crunch image resources. | 95 # Generate R.java and crunch image resources. |
94 { | 96 { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 '-DPACKAGE_NAME=<(package_name)', | 146 '-DPACKAGE_NAME=<(package_name)', |
145 '-DJAVAC_INCLUDES=>(javac_includes)', | 147 '-DJAVAC_INCLUDES=>(javac_includes)', |
146 | 148 |
147 '-Dbasedir=<(java_in_dir)', | 149 '-Dbasedir=<(java_in_dir)', |
148 '-buildfile', | 150 '-buildfile', |
149 '<(DEPTH)/build/android/ant/chromium-jars.xml' | 151 '<(DEPTH)/build/android/ant/chromium-jars.xml' |
150 ] | 152 ] |
151 }, | 153 }, |
152 ], | 154 ], |
153 } | 155 } |
OLD | NEW |