summaryrefslogtreecommitdiffstats
path: root/build/android/create_standalone_apk_action.gypi
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 07:58:19 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 07:58:19 +0000
commit7aea76b94b0fc1d7f0c65aa8da195852157d1bd7 (patch)
tree760117ea8d83c975cc32841b516f7015c99b3595 /build/android/create_standalone_apk_action.gypi
parent30c98bbd310b123082954cc88955725c265517a6 (diff)
downloadchromium_src-7aea76b94b0fc1d7f0c65aa8da195852157d1bd7.zip
chromium_src-7aea76b94b0fc1d7f0c65aa8da195852157d1bd7.tar.gz
chromium_src-7aea76b94b0fc1d7f0c65aa8da195852157d1bd7.tar.bz2
[Android] Support building standalone APK in component build
Many people's workflows assume that they can install the APK created in out/Debug/apks. With the component build that APK is actually an "incomplete" APK that cannot be manually installed (or rather causes obscure errors when manually installed). This change does two things. First, it moves the "incomplete" APK output to out/Debug/<package_name>/<ApkName>.apk. This should prevent accidental installs of the "incomplete" APK. Second, it introduces an option (create_standalone_apk) that when doing a component build, if set, will merge the shared libraries into the "incomplete" APK to create a standalone APK. This standalone APK will be created in out/Debug/apks/. Review URL: https://chromiumcodereview.appspot.com/14843017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207345 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/create_standalone_apk_action.gypi')
-rw-r--r--build/android/create_standalone_apk_action.gypi41
1 files changed, 41 insertions, 0 deletions
diff --git a/build/android/create_standalone_apk_action.gypi b/build/android/create_standalone_apk_action.gypi
new file mode 100644
index 0000000..ca9c190
--- /dev/null
+++ b/build/android/create_standalone_apk_action.gypi
@@ -0,0 +1,41 @@
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file is meant to be included into an action to provide an action that
+# combines a directory of shared libraries and an incomplete APK into a
+# standalone APK.
+#
+# To use this, create a gyp action with the following form:
+# {
+# 'action_name': 'some descriptive action name',
+# 'variables': {
+# 'inputs': [ 'input_path1', 'input_path2' ],
+# 'input_apk_path': '<(unsigned_apk_path)',
+# 'output_apk_path': '<(unsigned_standalone_apk_path)',
+# 'libraries_top_dir': '<(libraries_top_dir)',
+# },
+# 'includes': [ 'relative/path/to/create_standalone_apk_action.gypi' ],
+# },
+
+{
+ 'message': 'Creating standalone APK: <(output_apk_path)',
+ 'variables': {
+ 'inputs': [],
+ },
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/create_standalone_apk.py',
+ '<(input_apk_path)',
+ '>@(inputs)',
+ ],
+ 'outputs': [
+ '<(output_apk_path)',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/create_standalone_apk.py',
+ '--libraries-top-dir=<(libraries_top_dir)',
+ '--input-apk-path=<(unsigned_apk_path)',
+ '--output-apk-path=<(unsigned_standalone_apk_path)',
+ ],
+}