Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: build/java_apk.gypi

Issue 13269002: Allow the build to install apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp', 91 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp',
92 'strip_stamp': '<(intermediate_dir)/strip.stamp', 92 'strip_stamp': '<(intermediate_dir)/strip.stamp',
93 'classes_dir': '<(intermediate_dir)/classes', 93 'classes_dir': '<(intermediate_dir)/classes',
94 'javac_includes': [], 94 'javac_includes': [],
95 'jar_excluded_classes': [], 95 'jar_excluded_classes': [],
96 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', 96 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
97 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', 97 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar',
98 'dex_path': '<(intermediate_dir)/classes.dex', 98 'dex_path': '<(intermediate_dir)/classes.dex',
99 'android_manifest': '<(java_in_dir)/AndroidManifest.xml', 99 'android_manifest': '<(java_in_dir)/AndroidManifest.xml',
100 'codegen_input_paths': [], 100 'codegen_input_paths': [],
101 'final_apk_path': '<(PRODUCT_DIR)/apks/<(apk_name).apk',
102 'apk_install_stamp': '<(intermediate_dir)/apk_install.stamp',
101 }, 103 },
102 # Pass the jar path to the apk's "fake" jar target. This would be better as 104 # Pass the jar path to the apk's "fake" jar target. This would be better as
103 # direct_dependent_settings, but a variable set by a direct_dependent_settings 105 # direct_dependent_settings, but a variable set by a direct_dependent_settings
104 # cannot be lifted in a dependent to all_dependent_settings. 106 # cannot be lifted in a dependent to all_dependent_settings.
105 'all_dependent_settings': { 107 'all_dependent_settings': {
106 'variables': { 108 'variables': {
107 'apk_output_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', 109 'apk_output_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
108 }, 110 },
109 }, 111 },
110 'conditions': [ 112 'conditions': [
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 'variables': { 228 'variables': {
227 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'], 229 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'],
228 'grit_out_dir': '<(res_grit_dir)', 230 'grit_out_dir': '<(res_grit_dir)',
229 # resource_ids is unneeded since we don't generate .h headers. 231 # resource_ids is unneeded since we don't generate .h headers.
230 'grit_resource_ids': '', 232 'grit_resource_ids': '',
231 }, 233 },
232 'includes': ['../build/grit_action.gypi'], 234 'includes': ['../build/grit_action.gypi'],
233 }, 235 },
234 ], 236 ],
235 }], 237 }],
238 ['gyp_managed_install == 1', {
239 'actions': [
240 {
241 'action_name': 'apk_install_<(_target_name)',
242 'message': 'Installing <(apk_name).apk',
243 'inputs': [
244 '<(DEPTH)/build/android/pylib/build_utils.py',
245 '<(DEPTH)/build/android/gyp/apk_install.py',
246 '<(final_apk_path)',
247 ],
248 'outputs': [
249 '<(apk_install_stamp)'
250 ],
251 'action': [
252 'python', '<(DEPTH)/build/android/gyp/apk_install.py',
253 '--android-sdk-tools=<(android_sdk_tools)',
254 '--apk-path=<(final_apk_path)',
255 '--stamp=<(apk_install_stamp)'
256 ],
257 },
258 ],
259 }],
236 ], 260 ],
237 'actions': [ 261 'actions': [
238 { 262 {
239 'action_name': 'ant_codegen_<(_target_name)', 263 'action_name': 'ant_codegen_<(_target_name)',
240 'message': 'Generating R.java for <(_target_name)', 264 'message': 'Generating R.java for <(_target_name)',
241 'conditions': [ 265 'conditions': [
242 ['is_test_apk == 1', { 266 ['is_test_apk == 1', {
243 'variables': { 267 'variables': {
244 'additional_res_dirs=': [], 268 'additional_res_dirs=': [],
245 'additional_res_packages=': [], 269 'additional_res_packages=': [],
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 ], 455 ],
432 'conditions': [ 456 'conditions': [
433 ['is_test_apk == 1', { 457 ['is_test_apk == 1', {
434 'variables': { 458 'variables': {
435 'additional_res_dirs=': [], 459 'additional_res_dirs=': [],
436 'additional_res_packages=': [], 460 'additional_res_packages=': [],
437 } 461 }
438 }], 462 }],
439 ], 463 ],
440 'outputs': [ 464 'outputs': [
441 '<(PRODUCT_DIR)/apks/<(apk_name).apk', 465 '<(final_apk_path)',
442 ], 466 ],
443 'action': [ 467 'action': [
444 'ant', '-quiet', 468 'ant', '-quiet',
445 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', 469 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)',
446 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', 470 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)',
447 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', 471 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)',
448 '-DANDROID_SDK_JAR=<(android_sdk_jar)', 472 '-DANDROID_SDK_JAR=<(android_sdk_jar)',
449 '-DANDROID_SDK_ROOT=<(android_sdk_root)', 473 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
450 '-DANDROID_SDK_VERSION=<(android_sdk_version)', 474 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
451 '-DAPKS_DIR=<(PRODUCT_DIR)/apks', 475 '-DAPKS_DIR=<(PRODUCT_DIR)/apks',
(...skipping 13 matching lines...) Expand all
465 489
466 # Add list of inputs to the command line, so if inputs change 490 # Add list of inputs to the command line, so if inputs change
467 # (e.g. if a Java file is removed), the command will be re-run. 491 # (e.g. if a Java file is removed), the command will be re-run.
468 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. 492 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
469 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', 493 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)',
470 494
471 ] 495 ]
472 }, 496 },
473 ], 497 ],
474 } 498 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698