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

Side by Side Diff: build/java_apk.gypi

Issue 10914130: Make apks be built in a consistent way (Closed) Base URL: http://git.chromium.org/chromium/src.git@ant_ijpforrealz
Patch Set: Rebase Created 8 years, 3 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 | « no previous file | content/content_shell.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 # This file is meant to be included into a target to provide a rule
6 # to build Android APKs in a consistent manner.
7 #
8 # To use this, create a gyp target with the following form:
9 # {
10 # 'target_name': 'my_package_apk',
11 # 'type': 'none',
12 # 'variables': {
13 # 'package_name': 'my_package',
14 # 'apk_name': 'MyPackage',
15 # 'java_in_dir': 'path/to/package/root',
16 # 'resource_dir': 'path/to/package/root/res',
17 # },
18 # 'includes': ['path/to/this/gypi/file'],
19 # }
20 #
21 # Note that this assumes that there's an ant buildfile <package_name>_apk.xml in
22 # java_in_dir. So, if you have package_name="content_shell" and
23 # java_in_dir="content/shell/android/java" you should have a directory structure
24 # like:
25 #
26 # content/shell/android/java/content_shell_apk.xml
27 # content/shell/android/java/src/chromium/base/Foo.java
28 # content/shell/android/java/src/chromium/base/Bar.java
29
30 {
31 'variables': {
32 'input_jars_paths': [],
33 'native_libs_paths': [],
34 'additional_src_dirs': [],
35 'additional_input_paths': [],
36 },
37 'actions': [
38 {
39 'action_name': 'ant_<(package_name)_apk',
40 'message': 'Building <(package_name) apk.',
41 'inputs': [
42 '<(java_in_dir)/<(package_name)_apk.xml',
43 '<(java_in_dir)/AndroidManifest.xml',
44 '<(DEPTH)/build/android/ant/common.xml',
45 '<(DEPTH)/build/android/ant/sdk-targets.xml',
46 '<!@(find <(java_in_dir) -name "*.java")',
47 '<!@(find <(resource_dir) -name "*")',
48 '>@(input_jars_paths)',
49 '>@(native_libs_paths)',
50 '>@(additional_input_paths)',
51 ],
52 'outputs': [
53 '<(PRODUCT_DIR)/<(package_name)/<(apk_name)-debug.apk',
54 ],
55 'action': [
56 'ant',
57 '-DPRODUCT_DIR=<(ant_build_out)',
58 '-DAPP_ABI=<(android_app_abi)',
59 '-DANDROID_GDBSERVER=<(android_gdbserver)',
60 '-DANDROID_SDK=<(android_sdk)',
61 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
62 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
63 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
64 '-DANDROID_TOOLCHAIN=<(android_toolchain)',
65 '-DPACKAGE_NAME=<(package_name)',
66 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
67 '-DINPUT_JARS_PATHS=>(input_jars_paths)',
68 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)',
69 '-DRESOURCE_DIR=<(resource_dir)',
70 '-buildfile',
71 '<(java_in_dir)/<(package_name)_apk.xml'
72 ]
73 },
74 ],
75 }
OLDNEW
« no previous file with comments | « no previous file | content/content_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698