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

Unified Diff: build/android/package_resources_action.gypi

Issue 1140763002: Extract package_resources step into a .gypi & make assets & resource zips optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@apkbuilder
Patch Set: rebased Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gyp/package_resources.py ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/package_resources_action.gypi
diff --git a/build/android/package_resources_action.gypi b/build/android/package_resources_action.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..fe1645f8fcfc9ab1eed65912605d281cbfcfb501
--- /dev/null
+++ b/build/android/package_resources_action.gypi
@@ -0,0 +1,73 @@
+# Copyright 2015 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 a helper to java_apk.gypi. It should be used to create an
+# action that runs ApkBuilder via ANT.
+#
+# Required variables:
+# apk_name - File name (minus path & extension) of the output apk.
+# android_manifest_path - Path to AndroidManifest.xml.
+# app_manifest_version_name - set the apps 'human readable' version number.
+# app_manifest_version_code - set the apps version number.
+# Optional variables:
+# asset_location - The directory where assets are located (if any).
+# resource_zips - List of paths to resource zip files.
+# shared_resources - Make a resource package that can be loaded by a different
+# application at runtime to access the package's resources.
+# extensions_to_not_compress - E.g.: 'pak,dat,bin'
+# extra_inputs - List of extra action inputs.
+{
+ 'variables': {
+ 'asset_location%': '',
+ 'resource_zips%': [],
+ 'shared_resources%': 0,
+ 'extensions_to_not_compress%': '',
+ 'extra_inputs%': [],
+ 'resource_packaged_apk_name': '<(apk_name)-resources.ap_',
+ 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_name)',
+ },
+ 'action_name': 'package_resources_<(apk_name)',
+ 'message': 'packaging resources for <(apk_name)',
+ 'inputs': [
+ # TODO: This isn't always rerun correctly, http://crbug.com/351928
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/package_resources.py',
+ '<(android_manifest_path)',
+ '<@(extra_inputs)',
+ ],
+ 'outputs': [
+ '<(resource_packaged_apk_path)',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/package_resources.py',
+ '--android-sdk', '<(android_sdk)',
+ '--android-sdk-tools', '<(android_sdk_tools)',
+ '--configuration-name', '<(CONFIGURATION_NAME)',
+ '--android-manifest', '<(android_manifest_path)',
+ '--version-code', '<(app_manifest_version_code)',
+ '--version-name', '<(app_manifest_version_name)',
+ '--no-compress', '<(extensions_to_not_compress)',
+ '--apk-path', '<(resource_packaged_apk_path)',
+ ],
+ 'conditions': [
+ ['shared_resources == 1', {
+ 'action': [
+ '--shared-resources',
+ ],
+ }],
+ ['asset_location != ""', {
+ 'action': [
+ '--asset-dir', '<(asset_location)',
+ ],
+ }],
+ ['resource_zips != []', {
+ 'action': [
+ '--resource-zips', '>(resource_zips)',
+ ],
+ 'inputs': [
+ '>@(resource_zips)',
+ ],
+ }],
+ ],
+}
« no previous file with comments | « build/android/gyp/package_resources.py ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698