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 Android APKs in a consistent manner. | 6 # to build Android APKs 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_apk', | 10 # 'target_name': 'my_package_apk', |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 'lint_config': '<(intermediate_dir)/lint_config.xml', | 103 'lint_config': '<(intermediate_dir)/lint_config.xml', |
104 'never_lint%': 0, | 104 'never_lint%': 0, |
105 'java_in_dir_suffix%': '/src', | 105 'java_in_dir_suffix%': '/src', |
106 'instr_stamp': '<(intermediate_dir)/instr.stamp', | 106 'instr_stamp': '<(intermediate_dir)/instr.stamp', |
107 'jar_stamp': '<(intermediate_dir)/jar.stamp', | 107 'jar_stamp': '<(intermediate_dir)/jar.stamp', |
108 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp', | 108 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp', |
109 'pack_arm_relocations_stamp': '<(intermediate_dir)/pack_arm_relocations.stam
p', | 109 'pack_arm_relocations_stamp': '<(intermediate_dir)/pack_arm_relocations.stam
p', |
110 'strip_stamp': '<(intermediate_dir)/strip.stamp', | 110 'strip_stamp': '<(intermediate_dir)/strip.stamp', |
111 'stripped_libraries_dir': '<(intermediate_dir)/stripped_libraries', | 111 'stripped_libraries_dir': '<(intermediate_dir)/stripped_libraries', |
112 'strip_additional_stamp': '<(intermediate_dir)/strip_additional.stamp', | 112 'strip_additional_stamp': '<(intermediate_dir)/strip_additional.stamp', |
| 113 'version_stamp': '<(intermediate_dir)/version.stamp', |
113 'javac_includes': [], | 114 'javac_includes': [], |
114 'jar_excluded_classes': [], | 115 'jar_excluded_classes': [], |
115 'javac_jar_path': '<(intermediate_dir)/<(_target_name).javac.jar', | 116 'javac_jar_path': '<(intermediate_dir)/<(_target_name).javac.jar', |
116 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', | 117 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', |
117 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', | 118 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', |
118 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', | 119 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', |
119 'dex_path': '<(intermediate_dir)/classes.dex', | 120 'dex_path': '<(intermediate_dir)/classes.dex', |
120 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', | 121 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', |
121 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', | 122 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', |
122 'push_stamp': '<(intermediate_dir)/push.stamp', | 123 'push_stamp': '<(intermediate_dir)/push.stamp', |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 'stripped_libraries_dir%': '<(stripped_libraries_dir)', | 358 'stripped_libraries_dir%': '<(stripped_libraries_dir)', |
358 'packed_libraries_dir': '<(libraries_source_dir)', | 359 'packed_libraries_dir': '<(libraries_source_dir)', |
359 'input_paths': [ | 360 'input_paths': [ |
360 '<(strip_stamp)', | 361 '<(strip_stamp)', |
361 ], | 362 ], |
362 'stamp': '<(pack_arm_relocations_stamp)', | 363 'stamp': '<(pack_arm_relocations_stamp)', |
363 }, | 364 }, |
364 'includes': ['../build/android/pack_arm_relocations.gypi'], | 365 'includes': ['../build/android/pack_arm_relocations.gypi'], |
365 }, | 366 }, |
366 { | 367 { |
| 368 'action_name': 'insert_chromium_version', |
| 369 'variables': { |
| 370 'ordered_libraries_file%': '<(ordered_libraries_file)', |
| 371 'libraries_source_dir%': '<(libraries_source_dir)', |
| 372 'version_string': '<(native_lib_version_name)', |
| 373 'input_paths': [ |
| 374 '<(pack_arm_relocations_stamp)', |
| 375 ], |
| 376 'stamp': '<(version_stamp)' |
| 377 }, |
| 378 'includes': ['../build/android/insert_chromium_version.gypi'], |
| 379 }, |
| 380 { |
367 'variables': { | 381 'variables': { |
368 'input_libraries': [ | 382 'input_libraries': [ |
369 '<@(additional_bundled_libs)', | 383 '<@(additional_bundled_libs)', |
370 ], | 384 ], |
371 'ordered_libraries_file': '<(additional_ordered_libraries_file)', | 385 'ordered_libraries_file': '<(additional_ordered_libraries_file)', |
372 'subtarget': '_additional_libraries', | 386 'subtarget': '_additional_libraries', |
373 }, | 387 }, |
374 'includes': ['../build/android/write_ordered_libraries.gypi'], | 388 'includes': ['../build/android/write_ordered_libraries.gypi'], |
375 }, | 389 }, |
376 { | 390 { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 }, | 468 }, |
455 ], | 469 ], |
456 'conditions': [ | 470 'conditions': [ |
457 ['create_standalone_apk == 1', { | 471 ['create_standalone_apk == 1', { |
458 'actions': [ | 472 'actions': [ |
459 { | 473 { |
460 'action_name': 'create standalone APK', | 474 'action_name': 'create standalone APK', |
461 'variables': { | 475 'variables': { |
462 'inputs': [ | 476 'inputs': [ |
463 '<(ordered_libraries_file)', | 477 '<(ordered_libraries_file)', |
464 '<(pack_arm_relocations_stamp)', | |
465 '<(strip_additional_stamp)', | 478 '<(strip_additional_stamp)', |
| 479 '<(version_stamp)', |
466 ], | 480 ], |
467 'input_apk_path': '<(unsigned_apk_path)', | 481 'input_apk_path': '<(unsigned_apk_path)', |
468 'output_apk_path': '<(unsigned_standalone_apk_path)', | 482 'output_apk_path': '<(unsigned_standalone_apk_path)', |
469 'libraries_top_dir%': '<(libraries_top_dir)', | 483 'libraries_top_dir%': '<(libraries_top_dir)', |
470 }, | 484 }, |
471 'includes': [ 'android/create_standalone_apk_action.gypi' ], | 485 'includes': [ 'android/create_standalone_apk_action.gypi' ], |
472 }, | 486 }, |
473 ], | 487 ], |
474 }], | 488 }], |
475 ], | 489 ], |
476 }, { | 490 }, { |
477 # gyp_managed_install != 1 | 491 # gyp_managed_install != 1 |
478 'variables': { | 492 'variables': { |
479 'libraries_source_dir': '<(apk_package_native_libs_dir)/<(android_ap
p_abi)', | 493 'libraries_source_dir': '<(apk_package_native_libs_dir)/<(android_ap
p_abi)', |
480 'package_input_paths': [ | 494 'package_input_paths': [ |
481 '<(pack_arm_relocations_stamp)', | |
482 '<(strip_additional_stamp)', | 495 '<(strip_additional_stamp)', |
| 496 '<(version_stamp)', |
483 ], | 497 ], |
484 }, | 498 }, |
485 }], | 499 }], |
486 ], | 500 ], |
487 }], # native_lib_target != '' | 501 }], # native_lib_target != '' |
488 ['gyp_managed_install == 0 or create_standalone_apk == 1', { | 502 ['gyp_managed_install == 0 or create_standalone_apk == 1', { |
489 'actions': [ | 503 'actions': [ |
490 { | 504 { |
491 'action_name': 'finalize standalone apk', | 505 'action_name': 'finalize standalone apk', |
492 'variables': { | 506 'variables': { |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 '-DEMMA_INSTRUMENT=<(emma_instrument)', | 911 '-DEMMA_INSTRUMENT=<(emma_instrument)', |
898 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', | 912 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', |
899 | 913 |
900 '-Dbasedir=.', | 914 '-Dbasedir=.', |
901 '-buildfile', | 915 '-buildfile', |
902 '<(DEPTH)/build/android/ant/apk-package.xml', | 916 '<(DEPTH)/build/android/ant/apk-package.xml', |
903 ] | 917 ] |
904 }, | 918 }, |
905 ], | 919 ], |
906 } | 920 } |
OLD | NEW |