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

Unified Diff: build/java.gypi

Issue 10081035: Add templates for building java and running the jni_generator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make base targets only defined for androd Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gypi ('k') | build/jni_generator.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java.gypi
diff --git a/build/java.gypi b/build/java.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..9a6a6ed6dcd3a1d4824e96ad0820bd82373dd758
--- /dev/null
+++ b/build/java.gypi
@@ -0,0 +1,53 @@
+# 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 build Java in a consistent manner.
+#
+# To use this, create a gyp target with the following form:
+# {
+# 'target_name': 'my-package_java',
+# 'type': 'none',
+# 'variables': {
+# 'package_name': 'my-package',
+# 'java_in_dir': 'path/to/package/root',
+# },
+# 'includes': ['path/to/this/gypi/file'],
+# }
+#
+# Note that this assumes that there's ant buildfile with package_name in
+# java_in_dir. So if if you have package_name="base" and
+# java_in_dir="base/android/java" you should have a directory structure like:
+#
+# base/android/java/base.xml
+# base/android/java/org/chromium/base/Foo.java
+# base/android/java/org/chromium/base/Bar.java
+#
+# Finally, the generated jar-file will be:
+# <(PRODUCT_DIR)/chromium_base.jar
+#
+# TODO(yfriedman): The "finally" statement isn't entirely true yet, as we don't
+# auto-generate the ant file yet.
+
+{
+ 'actions': [
+ {
+ 'action_name': 'ant_<(package_name)',
+ 'message': 'Building <(package_name) java sources.',
+ 'inputs': [
+ '<(java_in_dir)/<(package_name).xml',
+ '<!@(find <(java_in_dir) -name "*.java")'
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/chromium_<(package_name).jar',
+ ],
+ 'action': [
+ 'ant',
+ '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '-buildfile',
+ '<(java_in_dir)/<(package_name).xml',
+ ]
+ },
+ ],
+}
« no previous file with comments | « base/base.gypi ('k') | build/jni_generator.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698