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

Side by Side Diff: build/jar_file_jni_generator.gypi

Issue 115103002: Android: sync up latest JNI generator changes from downstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds missing files Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file is meant to be included into a target to provide a rule 5 # This file is meant to be included into a target to provide a rule
6 # to generate jni bindings for system Java-files in a consistent manner. 6 # to generate jni bindings for system Java-files in a consistent manner.
7 # 7 #
8 # To use this, create a gyp target with the following form: 8 # To use this, create a gyp target with the following form:
9 # { 9 # {
10 # 'target_name': 'android_jar_jni_headers', 10 # 'target_name': 'android_jar_jni_headers',
11 # 'type': 'none', 11 # 'type': 'none',
12 # 'variables': { 12 # 'variables': {
13 # 'jni_gen_package': 'chrome', 13 # 'jni_gen_package': 'chrome',
14 # 'input_java_class': 'java/io/InputStream.class', 14 # 'input_java_class': 'java/io/InputStream.class',
15 # }, 15 # },
16 # 'includes': [ '../build/jar_file_jni_generator.gypi' ], 16 # 'includes': [ '../build/jar_file_jni_generator.gypi' ],
17 # }, 17 # },
18 # 18 #
19 # Optional variables: 19 # Optional variables:
20 # input_jar_file - The input jar file, if omitted, android_sdk_jar will be used . 20 # input_jar_file - The input jar file, if omitted, android_sdk_jar will be used .
21 21
22 { 22 {
23 'variables': { 23 'variables': {
24 'jni_generator': '<(DEPTH)/base/android/jni_generator/jni_generator.py', 24 'jni_generator': '<(DEPTH)/base/android/jni_generator/jni_generator.py',
25 # A comma separated string of include files.
26 'jni_generator_includes%': (
27 'base/android/jni_generator/jni_generator_helper.h'
28 ),
25 }, 29 },
26 'actions': [ 30 'actions': [
27 { 31 {
28 'action_name': 'generate_jni_headers_from_jar_file', 32 'action_name': 'generate_jni_headers_from_jar_file',
29 'inputs': [ 33 'inputs': [
30 '<(jni_generator)', 34 '<(jni_generator)',
31 '<(input_jar_file)', 35 '<(input_jar_file)',
32 '<(android_sdk_jar)', 36 '<(android_sdk_jar)',
33 ], 37 ],
34 'variables': { 38 'variables': {
35 'java_class_name': '<!(basename <(input_java_class)|sed "s/\.class//")', 39 'java_class_name': '<!(basename <(input_java_class)|sed "s/\.class//")',
36 'input_jar_file%': '<(android_sdk_jar)' 40 'input_jar_file%': '<(android_sdk_jar)'
37 }, 41 },
38 'outputs': [ 42 'outputs': [
39 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni/<(java_class_name)_jn i.h', 43 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni/<(java_class_name)_jn i.h',
40 ], 44 ],
41 'action': [ 45 'action': [
42 '<(jni_generator)', 46 '<(jni_generator)',
43 '-j', 47 '-j',
44 '<(input_jar_file)', 48 '<(input_jar_file)',
45 '--input_file', 49 '--input_file',
46 '<(input_java_class)', 50 '<(input_java_class)',
47 '--output_dir', 51 '--output_dir',
48 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni', 52 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni',
53 '--includes',
54 '<(jni_generator_includes)',
49 '--optimize_generation', 55 '--optimize_generation',
50 '<(optimize_jni_generation)', 56 '<(optimize_jni_generation)',
51 ], 57 ],
52 'message': 'Generating JNI bindings from <(input_jar_file)/<(input_java_c lass)', 58 'message': 'Generating JNI bindings from <(input_jar_file)/<(input_java_c lass)',
53 'process_outputs_as_sources': 1, 59 'process_outputs_as_sources': 1,
54 }, 60 },
55 ], 61 ],
56 # This target exports a hard dependency because it generates header 62 # This target exports a hard dependency because it generates header
57 # files. 63 # files.
58 'hard_dependency': 1, 64 'hard_dependency': 1,
59 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698