Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 Java in a consistent manner. | |
| 7 # | |
| 8 # To use this, create a gyp target with the following form: | |
| 9 # { | |
| 10 # 'target_name': 'my-package_java', | |
|
Ryan Sleevi
2012/04/14 03:10:50
nit: 'my-package_java' -> 'my_package_java' ?
Jus
Yaron
2012/04/16 20:44:56
Ya. I could make it package_java but I wanted to h
| |
| 11 # 'type': 'none', | |
| 12 # 'variables': { | |
| 13 # 'package_name': 'my-package', | |
| 14 # 'java_root': 'path/to/package/root', | |
|
Ryan Sleevi
2012/04/14 03:10:50
It seems a bit odd that this doesn't get relativiz
Yaron
2012/04/16 20:44:56
Done.
| |
| 15 # }, | |
| 16 # 'includes': ['path/to/this/gypi/file'], | |
| 17 # } | |
| 18 # | |
| 19 # Note that this assumes that there's ant buildfile with package_name in | |
| 20 # java_root. So if if you have package_name="base" and | |
| 21 # java_root="base/android/java" you should have a directory structure like: | |
| 22 # | |
| 23 # base/android/java/base.xml | |
| 24 # base/android/java/org/chromium/base/Foo.java | |
| 25 # base/android/java/org/chromium/base/Bar.java | |
| 26 # | |
| 27 # Finally, the generated jar-file will be: | |
| 28 # <(PRODUCT_DIR)/chromium_base.jar | |
| 29 # | |
| 30 # TODO(yfriedman): The "finally" statement isn't entirely true yet, as we don't | |
| 31 # auto-generate the ant file yet. | |
| 32 | |
| 33 { | |
| 34 'actions': [ | |
| 35 { | |
| 36 'action_name': 'ant_<(package_name)', | |
| 37 'message': 'Building <(package_name) java sources.', | |
| 38 'inputs': [ | |
| 39 '<(DEPTH)/<(java_root)/<(package_name).xml', | |
| 40 '<!@(find <(DEPTH)/<(java_root) -name "*.java")' | |
| 41 ], | |
| 42 'outputs': [ | |
| 43 '<(PRODUCT_DIR)/chromium_<(package_name).jar', | |
| 44 ], | |
| 45 'action': [ | |
| 46 'ant', | |
| 47 '-DPRODUCT_DIR=<(PRODUCT_DIR)', | |
| 48 '-buildfile', | |
| 49 '<(DEPTH)/<(java_root)/<(package_name).xml', | |
| 50 ] | |
| 51 }, | |
| 52 ], | |
| 53 } | |
| OLD | NEW |