| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 'message': 'Compiling <(_target_name) java sources', | 180 'message': 'Compiling <(_target_name) java sources', |
| 181 'variables': { | 181 'variables': { |
| 182 'all_src_dirs': [ | 182 'all_src_dirs': [ |
| 183 '>(java_in_dir)/src', | 183 '>(java_in_dir)/src', |
| 184 '>@(additional_src_dirs)', | 184 '>@(additional_src_dirs)', |
| 185 '>@(generated_src_dirs)', | 185 '>@(generated_src_dirs)', |
| 186 ], | 186 ], |
| 187 }, | 187 }, |
| 188 'inputs': [ | 188 'inputs': [ |
| 189 '<(DEPTH)/build/android/pylib/build_utils.py', | 189 '<(DEPTH)/build/android/pylib/build_utils.py', |
| 190 '<(DEPTH)/build/android/javac.py', | 190 '<(DEPTH)/build/android/gyp/javac.py', |
| 191 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', | 191 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', |
| 192 '>@(input_jars_paths)', | 192 '>@(input_jars_paths)', |
| 193 '>@(additional_input_paths)', | 193 '>@(additional_input_paths)', |
| 194 ], | 194 ], |
| 195 'outputs': [ | 195 'outputs': [ |
| 196 '<(compile_stamp)', | 196 '<(compile_stamp)', |
| 197 ], | 197 ], |
| 198 'action': [ | 198 'action': [ |
| 199 'python', '<(DEPTH)/build/android/javac.py', | 199 'python', '<(DEPTH)/build/android/gyp/javac.py', |
| 200 '--output-dir=<(classes_dir)', | 200 '--output-dir=<(classes_dir)', |
| 201 '--classpath=>(input_jars_paths)', | 201 '--classpath=>(input_jars_paths)', |
| 202 '--src-dirs=>(all_src_dirs)', | 202 '--src-dirs=>(all_src_dirs)', |
| 203 '--javac-includes=<(javac_includes)', | 203 '--javac-includes=<(javac_includes)', |
| 204 '--chromium-code=<(chromium_code)', | 204 '--chromium-code=<(chromium_code)', |
| 205 '--stamp=<(compile_stamp)', | 205 '--stamp=<(compile_stamp)', |
| 206 | 206 |
| 207 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 207 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
| 208 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 208 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 209 ] | 209 ] |
| 210 }, | 210 }, |
| 211 { | 211 { |
| 212 'action_name': 'jar_<(_target_name)', | 212 'action_name': 'jar_<(_target_name)', |
| 213 'message': 'Creating <(_target_name) jar', | 213 'message': 'Creating <(_target_name) jar', |
| 214 'inputs': [ | 214 'inputs': [ |
| 215 '<(DEPTH)/build/android/pylib/build_utils.py', | 215 '<(DEPTH)/build/android/pylib/build_utils.py', |
| 216 '<(DEPTH)/build/android/jar.py', | 216 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
| 217 '<(DEPTH)/build/android/gyp/jar.py', |
| 217 '<(compile_stamp)', | 218 '<(compile_stamp)', |
| 218 ], | 219 ], |
| 219 'outputs': [ | 220 'outputs': [ |
| 220 '<(jar_path)', | 221 '<(jar_path)', |
| 221 ], | 222 ], |
| 222 'action': [ | 223 'action': [ |
| 223 'python', '<(DEPTH)/build/android/jar.py', | 224 'python', '<(DEPTH)/build/android/gyp/jar.py', |
| 224 '--classes-dir=<(classes_dir)', | 225 '--classes-dir=<(classes_dir)', |
| 225 '--jar-path=<(jar_path)', | 226 '--jar-path=<(jar_path)', |
| 226 '--excluded-classes=<(jar_excluded_classes)', | 227 '--excluded-classes=<(jar_excluded_classes)', |
| 227 | 228 |
| 228 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 229 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
| 229 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 230 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 230 ] | 231 ] |
| 231 }, | 232 }, |
| 232 { | 233 { |
| 233 'action_name': 'dex_<(_target_name)', | 234 'action_name': 'dex_<(_target_name)', |
| 234 'message': 'Dexing <(_target_name) jar', | 235 'message': 'Dexing <(_target_name) jar', |
| 235 'inputs': [ | 236 'inputs': [ |
| 236 '<(DEPTH)/build/android/pylib/build_utils.py', | 237 '<(DEPTH)/build/android/pylib/build_utils.py', |
| 237 '<(DEPTH)/build/android/dex.py', | 238 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
| 239 '<(DEPTH)/build/android/gyp/dex.py', |
| 238 '<(jar_path)', | 240 '<(jar_path)', |
| 239 ], | 241 ], |
| 240 'outputs': [ | 242 'outputs': [ |
| 241 '<(dex_path)', | 243 '<(dex_path)', |
| 242 ], | 244 ], |
| 243 'action': [ | 245 'action': [ |
| 244 'python', '<(DEPTH)/build/android/dex.py', | 246 'python', '<(DEPTH)/build/android/gyp/dex.py', |
| 245 '--dex-path=<(dex_path)', | 247 '--dex-path=<(dex_path)', |
| 246 '--android-sdk-root=<(android_sdk_root)', | 248 '--android-sdk-root=<(android_sdk_root)', |
| 247 | 249 |
| 248 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 250 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
| 249 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 251 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 250 | 252 |
| 251 '<(jar_path)', | 253 '<(jar_path)', |
| 252 ] | 254 ] |
| 253 }, | 255 }, |
| 254 | 256 |
| 255 ], | 257 ], |
| 256 } | 258 } |
| OLD | NEW |