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 generate jni bindings for Java-files in a consistent manner. | |
| 7 # | |
| 8 # To use this, create a gyp target with the following form: | |
| 9 # { | |
| 10 # 'target_name': 'base_jni_headers', | |
| 11 # 'type': 'none', | |
| 12 # 'variables': { | |
| 13 # 'java_sources': [ | |
| 14 # 'android/java/org/chromium/base/BuildInfo.java', | |
| 15 # 'android/java/org/chromium/base/PathUtils.java', | |
| 16 # 'android/java/org/chromium/base/SystemMessageHandler.java', | |
| 17 # ], | |
| 18 # 'jni_headers': [ | |
| 19 # '<(SHARED_INTERMEDIATE_DIR)/base/jni/build_info_jni.h', | |
| 20 # '<(SHARED_INTERMEDIATE_DIR)/base/jni/path_utils_jni.h', | |
| 21 # '<(SHARED_INTERMEDIATE_DIR)/base/jni/system_message_handler_jni.h', | |
| 22 # ], | |
| 23 # }, | |
| 24 # 'includes': [ '../build/jni_generator.gypi' ], | |
| 25 # } | |
| 26 # | |
| 27 # The ordering of the java_sources must match the ordering of jni_headers. The | |
| 28 # result is that for each Java file listed in java_sources, the corresponding | |
| 29 # entry in jni_headers contains the JNI bindings produced from running the | |
| 30 # jni_generator on the input file. | |
| 31 # | |
| 32 # See base/android/jni_generator/jni_generator.py for more info about the | |
| 33 # format of generating JNI bindings. | |
| 34 | |
| 35 { | |
| 36 'actions': [ | |
| 37 { | |
| 38 'action_name': 'generate_jni_headers', | |
| 39 'type': 'none', | |
| 40 'inputs': [ | |
| 41 '<(DEPTH)/base/android/jni_generator/jni_generator.py', | |
|
Ryan Sleevi
2012/04/14 03:10:50
I wonder if this should be under
build/android
ra
Yaron
2012/04/16 20:44:56
I'm kinda ambivalent about whether it's in base or
Ryan Sleevi
2012/04/16 21:03:00
I'm fine with either approach if you do update.
| |
| 42 '<@(java_sources)', | |
| 43 ], | |
| 44 'outputs': [ | |
| 45 '<@(jni_headers)', | |
|
Ryan Sleevi
2012/04/14 03:10:50
Are the JNI header names deterministic? Just wonde
Yaron
2012/04/16 20:44:56
Downstream I think there are a few exceptions but
Ryan Sleevi
2012/04/16 21:03:00
Ah, right, using <(RULE_INPUT_ROOT) with BuildInfo
Yaron
2012/04/16 21:15:32
I'm wondering if this merits an exception in the s
Yaron
2012/04/16 21:21:23
Oh and as for the pymod_do_main part of your comme
Ryan Sleevi
2012/04/16 21:25:05
Mark and/or chromium-dev.
So far our rules have l
Ryan Sleevi
2012/04/16 21:25:05
Yes. However, with the use of wildcard expansion f
| |
| 46 ], | |
| 47 'action': [ | |
| 48 'python', | |
| 49 '<(DEPTH)/base/android/jni_generator/jni_generator.py', | |
| 50 '-o', | |
| 51 '<@(_inputs)', | |
| 52 '<@(_outputs)', | |
| 53 ], | |
| 54 }, | |
| 55 ], | |
| 56 } | |
| OLD | NEW |