| 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 26 matching lines...) Expand all Loading... |
| 37 # Android-compatible resources folder named res. If 1, R_package and | 37 # Android-compatible resources folder named res. If 1, R_package and |
| 38 # R_package_relpath must also be set. | 38 # R_package_relpath must also be set. |
| 39 # R_package - The java package in which the R class (which maps resources to | 39 # R_package - The java package in which the R class (which maps resources to |
| 40 # integer IDs) should be generated, e.g. org.chromium.content. | 40 # integer IDs) should be generated, e.g. org.chromium.content. |
| 41 # R_package_relpath - Same as R_package, but replace each '.' with '/'. | 41 # R_package_relpath - Same as R_package, but replace each '.' with '/'. |
| 42 # java_strings_grd - The name of the grd file from which to generate localized | 42 # java_strings_grd - The name of the grd file from which to generate localized |
| 43 # strings.xml files, if any. | 43 # strings.xml files, if any. |
| 44 # res_extra_dirs - A list of extra directories containing Android resources. | 44 # res_extra_dirs - A list of extra directories containing Android resources. |
| 45 # These directories may be generated at build time. | 45 # These directories may be generated at build time. |
| 46 # res_extra_files - A list of the files in res_extra_dirs. | 46 # res_extra_files - A list of the files in res_extra_dirs. |
| 47 # never_lint - Set to 1 to not run lint on this target. |
| 47 | 48 |
| 48 { | 49 { |
| 49 'dependencies': [ | 50 'dependencies': [ |
| 50 '<(DEPTH)/build/android/setup.gyp:build_output_dirs' | 51 '<(DEPTH)/build/android/setup.gyp:build_output_dirs' |
| 51 ], | 52 ], |
| 52 'variables': { | 53 'variables': { |
| 53 'android_jar': '<(android_sdk)/android.jar', | 54 'android_jar': '<(android_sdk)/android.jar', |
| 54 'input_jars_paths': [ '<(android_jar)' ], | 55 'input_jars_paths': [ '<(android_jar)' ], |
| 55 'additional_src_dirs': [], | 56 'additional_src_dirs': [], |
| 56 'javac_includes': [], | 57 'javac_includes': [], |
| 57 'jar_name': '<(_target_name).jar', | 58 'jar_name': '<(_target_name).jar', |
| 58 'jar_dir': '<(PRODUCT_DIR)/lib.java', | 59 'jar_dir': '<(PRODUCT_DIR)/lib.java', |
| 59 'jar_path': '<(intermediate_dir)/<(jar_name)', | 60 'jar_path': '<(intermediate_dir)/<(jar_name)', |
| 60 'jar_final_path': '<(jar_dir)/<(jar_name)', | 61 'jar_final_path': '<(jar_dir)/<(jar_name)', |
| 61 'jar_excluded_classes': [ '*/R.class', '*/R##*.class' ], | 62 'jar_excluded_classes': [ '*/R.class', '*/R##*.class' ], |
| 62 'instr_stamp': '<(intermediate_dir)/instr.stamp', | 63 'instr_stamp': '<(intermediate_dir)/instr.stamp', |
| 63 'additional_input_paths': [], | 64 'additional_input_paths': [], |
| 64 'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar', | 65 'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar', |
| 65 'generated_src_dirs': ['>@(generated_R_dirs)'], | 66 'generated_src_dirs': ['>@(generated_R_dirs)'], |
| 66 'generated_R_dirs': [], | 67 'generated_R_dirs': [], |
| 67 'has_java_resources%': 0, | 68 'has_java_resources%': 0, |
| 68 'java_strings_grd%': '', | 69 'java_strings_grd%': '', |
| 69 'res_extra_dirs': [], | 70 'res_extra_dirs': [], |
| 70 'res_extra_files': [], | 71 'res_extra_files': [], |
| 71 'res_v14_verify_only%': 0, | 72 'res_v14_verify_only%': 0, |
| 72 'resource_input_paths': ['>@(res_extra_files)'], | 73 'resource_input_paths': ['>@(res_extra_files)'], |
| 73 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', | 74 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', |
| 74 'classes_dir': '<(intermediate_dir)/classes', | 75 'classes_dir': '<(intermediate_dir)/classes', |
| 75 'compile_stamp': '<(intermediate_dir)/compile.stamp', | 76 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
| 77 'lint_stamp': '<(intermediate_dir)/lint.stamp', |
| 78 'lint_result': '<(intermediate_dir)/lint_result.xml', |
| 79 'lint_config': '<(intermediate_dir)/lint_config.xml', |
| 80 'never_lint%': 0, |
| 76 'proguard_config%': '', | 81 'proguard_config%': '', |
| 77 'proguard_preprocess%': '0', | 82 'proguard_preprocess%': '0', |
| 78 'variables': { | 83 'variables': { |
| 79 'variables': { | 84 'variables': { |
| 80 'proguard_preprocess%': 0, | 85 'proguard_preprocess%': 0, |
| 81 'emma_never_instrument%': 0, | 86 'emma_never_instrument%': 0, |
| 82 }, | 87 }, |
| 83 'conditions': [ | 88 'conditions': [ |
| 84 ['proguard_preprocess == 1', { | 89 ['proguard_preprocess == 1', { |
| 85 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar' | 90 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar' |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 '--src-dirs=>(all_src_dirs)', | 306 '--src-dirs=>(all_src_dirs)', |
| 302 '--javac-includes=<(javac_includes)', | 307 '--javac-includes=<(javac_includes)', |
| 303 '--chromium-code=<(chromium_code)', | 308 '--chromium-code=<(chromium_code)', |
| 304 '--stamp=<(compile_stamp)', | 309 '--stamp=<(compile_stamp)', |
| 305 | 310 |
| 306 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 311 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
| 307 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 312 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 308 ] | 313 ] |
| 309 }, | 314 }, |
| 310 { | 315 { |
| 316 'variables': { |
| 317 'src_dirs': [ |
| 318 '<(java_in_dir)/src', |
| 319 '>@(additional_src_dirs)', |
| 320 ], |
| 321 'stamp_path': '<(lint_stamp)', |
| 322 'result_path': '<(lint_result)', |
| 323 'config_path': '<(lint_config)', |
| 324 }, |
| 325 'inputs': [ |
| 326 '<(compile_stamp)', |
| 327 ], |
| 328 'outputs': [ |
| 329 '<(lint_stamp)', |
| 330 ], |
| 331 'includes': [ 'android/lint_action.gypi' ], |
| 332 }, |
| 333 { |
| 311 'action_name': 'jar_<(_target_name)', | 334 'action_name': 'jar_<(_target_name)', |
| 312 'message': 'Creating <(_target_name) jar', | 335 'message': 'Creating <(_target_name) jar', |
| 313 'inputs': [ | 336 'inputs': [ |
| 314 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 337 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 315 '<(DEPTH)/build/android/gyp/util/md5_check.py', | 338 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
| 316 '<(DEPTH)/build/android/gyp/jar.py', | 339 '<(DEPTH)/build/android/gyp/jar.py', |
| 317 '<(compile_stamp)', | 340 '<(compile_stamp)', |
| 318 ], | 341 ], |
| 319 'outputs': [ | 342 'outputs': [ |
| 320 '<(javac_jar_path)', | 343 '<(javac_jar_path)', |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 'dex_no_locals': 1, | 398 'dex_no_locals': 1, |
| 376 }], | 399 }], |
| 377 ], | 400 ], |
| 378 'dex_input_paths': [ '<(jar_final_path)' ], | 401 'dex_input_paths': [ '<(jar_final_path)' ], |
| 379 'output_path': '<(dex_path)', | 402 'output_path': '<(dex_path)', |
| 380 }, | 403 }, |
| 381 'includes': [ 'android/dex_action.gypi' ], | 404 'includes': [ 'android/dex_action.gypi' ], |
| 382 }, | 405 }, |
| 383 ], | 406 ], |
| 384 } | 407 } |
| OLD | NEW |