summaryrefslogtreecommitdiffstats
path: root/build/java_prebuilt.gypi
diff options
context:
space:
mode:
authornyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 04:56:56 +0000
committernyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 04:56:56 +0000
commit3da3827e1c5eafdadf50ddd422d95eadb8fc0374 (patch)
treea3796b2632e54f1eabfab4ed946e2690b7074eed /build/java_prebuilt.gypi
parent474a729583233c416670a02a24b17489d18c5d41 (diff)
downloadchromium_src-3da3827e1c5eafdadf50ddd422d95eadb8fc0374.zip
chromium_src-3da3827e1c5eafdadf50ddd422d95eadb8fc0374.tar.gz
chromium_src-3da3827e1c5eafdadf50ddd422d95eadb8fc0374.tar.bz2
Add helper gypi for predexing of prebuilt jars.
After https://codereview.chromium.org/12913009/ landed we need to change the gyp targets that include prebuilt jars. Some of these live in external repositories. This adds a helper gypi for those targets so they are configured correctly. This should also make it easier going forward to update such targets. BUG=158821,224600 Review URL: https://chromiumcodereview.appspot.com/13234002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191299 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java_prebuilt.gypi')
-rw-r--r--build/java_prebuilt.gypi59
1 files changed, 59 insertions, 0 deletions
diff --git a/build/java_prebuilt.gypi b/build/java_prebuilt.gypi
new file mode 100644
index 0000000..57255e1
--- /dev/null
+++ b/build/java_prebuilt.gypi
@@ -0,0 +1,59 @@
+# Copyright (c) 2012 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 a target to provide a rule
+# to package prebuilt Java JARs in a consistent manner.
+#
+# To use this, create a gyp target with the following form:
+# {
+# 'target_name': 'my-package_java',
+# 'type': 'none',
+# 'variables': {
+# 'jar_path': 'path/to/your.jar',
+# },
+# 'includes': ['path/to/this/gypi/file'],
+# }
+#
+# Required variables:
+# jar_path - The path to the prebuilt Java JAR file.
+
+{
+ 'dependencies': [
+ '<(DEPTH)/build/build_output_dirs_android.gyp:build_output_dirs'
+ ],
+ 'variables': {
+ 'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar',
+ },
+ 'all_dependent_settings': {
+ 'variables': {
+ 'input_jars_paths': ['<(jar_path)'],
+ 'library_dexed_jars_paths': ['<(dex_path)'],
+ },
+ },
+ 'actions': [
+ {
+ 'action_name': 'dex_<(_target_name)',
+ 'message': 'Dexing <(_target_name) jar',
+ 'inputs': [
+ '<(DEPTH)/build/android/pylib/build_utils.py',
+ '<(DEPTH)/build/android/dex.py',
+ '<(jar_path)',
+ ],
+ 'outputs': [
+ '<(dex_path)',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/dex.py',
+ '--dex-path=<(dex_path)',
+ '--android-sdk-root=<(android_sdk_root)',
+
+ # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
+ '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
+
+ '<(jar_path)',
+ ]
+ },
+
+ ],
+}