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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 { | 52 { |
53 'variables': { | 53 'variables': { |
54 'additional_input_paths': [], | 54 'additional_input_paths': [], |
55 'input_jars_paths': [], | 55 'input_jars_paths': [], |
56 'library_dexed_jars_paths': [], | 56 'library_dexed_jars_paths': [], |
57 'additional_src_dirs': [], | 57 'additional_src_dirs': [], |
58 'generated_src_dirs': [], | 58 'generated_src_dirs': [], |
59 'app_manifest_version_name%': '<(android_app_version_name)', | 59 'app_manifest_version_name%': '<(android_app_version_name)', |
60 'app_manifest_version_code%': '<(android_app_version_code)', | 60 'app_manifest_version_code%': '<(android_app_version_code)', |
61 'proguard_enabled%': 'false', | 61 'proguard_enabled%': 'false', |
62 'proguard_flags_path%': '<(DEPTH)/build/android/empty_proguard.flags', | 62 'proguard_flags_paths%': ['<(DEPTH)/build/android/empty_proguard.flags'], |
63 'native_libs_paths': [], | 63 'native_libs_paths': [], |
64 'jar_name': 'chromium_apk_<(_target_name).jar', | 64 'jar_name': 'chromium_apk_<(_target_name).jar', |
65 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', | 65 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', |
66 'R_package%':'', | 66 'R_package%':'', |
67 'additional_res_dirs': [], | 67 'additional_res_dirs': [], |
68 'additional_res_packages': [], | 68 'additional_res_packages': [], |
69 'is_test_apk%': 0, | 69 'is_test_apk%': 0, |
70 'java_strings_grd%': '', | 70 'java_strings_grd%': '', |
71 'library_manifest_paths' : [], | 71 'library_manifest_paths' : [], |
72 'resource_input_paths': [], | 72 'resource_input_paths': [], |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 339 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
340 ] | 340 ] |
341 }, | 341 }, |
342 { | 342 { |
343 'action_name': 'ant_obfuscate_<(_target_name)', | 343 'action_name': 'ant_obfuscate_<(_target_name)', |
344 'message': 'Obfuscating <(_target_name)', | 344 'message': 'Obfuscating <(_target_name)', |
345 'inputs': [ | 345 'inputs': [ |
346 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', | 346 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', |
347 '<(DEPTH)/build/android/ant/create-test-jar.js', | 347 '<(DEPTH)/build/android/ant/create-test-jar.js', |
348 '<(compile_stamp)', | 348 '<(compile_stamp)', |
349 '<(proguard_flags_path)', | 349 '>@(proguard_flags_paths)', |
350 ], | 350 ], |
351 'outputs': [ | 351 'outputs': [ |
352 '<(obfuscate_stamp)', | 352 '<(obfuscate_stamp)', |
353 ], | 353 ], |
354 'action': [ | 354 'action': [ |
355 'ant', '-quiet', | 355 'ant', '-quiet', |
356 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 356 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
357 '-DANDROID_SDK_JAR=<(android_sdk_jar)', | 357 '-DANDROID_SDK_JAR=<(android_sdk_jar)', |
358 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 358 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
359 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | 359 '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
360 '-DAPK_NAME=<(apk_name)', | 360 '-DAPK_NAME=<(apk_name)', |
361 '-DCREATE_TEST_JAR_PATH=<(DEPTH)/build/android/ant/create-test-jar.js', | 361 '-DCREATE_TEST_JAR_PATH=<(DEPTH)/build/android/ant/create-test-jar.js', |
362 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', | 362 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
363 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', | 363 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
364 '-DINPUT_JARS_PATHS=>(input_jars_paths)', | 364 '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
365 '-DIS_TEST_APK=<(is_test_apk)', | 365 '-DIS_TEST_APK=<(is_test_apk)', |
366 '-DJAR_PATH=<(PRODUCT_DIR)/lib.java/<(jar_name)', | 366 '-DJAR_PATH=<(PRODUCT_DIR)/lib.java/<(jar_name)', |
367 '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)', | 367 '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)', |
368 '-DOUT_DIR=<(intermediate_dir)', | 368 '-DOUT_DIR=<(intermediate_dir)', |
369 '-DPROGUARD_ENABLED=<(proguard_enabled)', | 369 '-DPROGUARD_ENABLED=<(proguard_enabled)', |
370 '-DPROGUARD_FLAGS=<(proguard_flags_path)', | 370 '-DPROGUARD_FLAGS=<(proguard_flags_paths)', |
371 '-DTEST_JAR_PATH=<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', | 371 '-DTEST_JAR_PATH=<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', |
372 | 372 |
373 '-DSTAMP=<(obfuscate_stamp)', | 373 '-DSTAMP=<(obfuscate_stamp)', |
374 '-Dbasedir=.', | 374 '-Dbasedir=.', |
375 '-buildfile', | 375 '-buildfile', |
376 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', | 376 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', |
377 | 377 |
378 # Add list of inputs to the command line, so if inputs change | 378 # Add list of inputs to the command line, so if inputs change |
379 # (e.g. if a Java file is removed), the command will be re-run. | 379 # (e.g. if a Java file is removed), the command will be re-run. |
380 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 380 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 466 |
467 # Add list of inputs to the command line, so if inputs change | 467 # Add list of inputs to the command line, so if inputs change |
468 # (e.g. if a Java file is removed), the command will be re-run. | 468 # (e.g. if a Java file is removed), the command will be re-run. |
469 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 469 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
470 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 470 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
471 | 471 |
472 ] | 472 ] |
473 }, | 473 }, |
474 ], | 474 ], |
475 } | 475 } |
OLD | NEW |