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

Side by Side Diff: build/jar_file_jni_generator.gypi

Issue 454923002: Don't register JNI methods for the android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | build/jni_generator.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 25 # A comma separated string of include files.
26 'jni_generator_includes%': ( 26 'jni_generator_includes%': (
27 'base/android/jni_generator/jni_generator_helper.h' 27 'base/android/jni_generator/jni_generator_helper.h'
28 ), 28 ),
29 'native_exports%': '',
29 }, 30 },
30 'actions': [ 31 'actions': [
31 { 32 {
32 'action_name': 'generate_jni_headers_from_jar_file', 33 'action_name': 'generate_jni_headers_from_jar_file',
33 'inputs': [ 34 'inputs': [
34 '<(jni_generator)', 35 '<(jni_generator)',
35 '<(input_jar_file)', 36 '<(input_jar_file)',
36 '<(android_sdk_jar)', 37 '<(android_sdk_jar)',
37 ], 38 ],
38 'variables': { 39 'variables': {
39 'java_class_name': '<!(basename <(input_java_class)|sed "s/\.class//")', 40 'java_class_name': '<!(basename <(input_java_class)|sed "s/\.class//")',
40 'input_jar_file%': '<(android_sdk_jar)' 41 'input_jar_file%': '<(android_sdk_jar)'
41 }, 42 },
42 'outputs': [ 43 'outputs': [
43 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni/<(java_class_name)_jn i.h', 44 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni/<(java_class_name)_jn i.h',
44 ], 45 ],
45 'action': [ 46 'action': [
46 '<(jni_generator)', 47 '<(jni_generator)',
47 '-j', 48 '-j',
48 '<(input_jar_file)', 49 '<(input_jar_file)',
49 '--input_file', 50 '--input_file',
50 '<(input_java_class)', 51 '<(input_java_class)',
51 '--output_dir', 52 '--output_dir',
52 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni', 53 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni',
53 '--includes', 54 '--includes',
54 '<(jni_generator_includes)', 55 '<(jni_generator_includes)',
55 '--optimize_generation', 56 '--optimize_generation',
56 '<(optimize_jni_generation)', 57 '<(optimize_jni_generation)',
58 '<(native_exports)',
57 ], 59 ],
58 'message': 'Generating JNI bindings from <(input_jar_file)/<(input_java_c lass)', 60 'message': 'Generating JNI bindings from <(input_jar_file)/<(input_java_c lass)',
59 'process_outputs_as_sources': 1, 61 'process_outputs_as_sources': 1,
60 }, 62 },
61 ], 63 ],
62 # This target exports a hard dependency because it generates header 64 # This target exports a hard dependency because it generates header
63 # files. 65 # files.
64 'hard_dependency': 1, 66 'hard_dependency': 1,
67 'conditions': [
68 ['android_webview_build==1', {
69 'variables': {
70 'native_exports%': '--native_exports',
71 },
72 'dependencies': [
73 '<(DEPTH)/build/linker_script_copy.gyp:linker_script_copy',
74 ],
75 'conditions': [
76 ['component=="static_library"', {
77 'link_settings': {
78 'ldflags': [
79 # Only export symbols that are specified in version script.
80 '-Wl,--version-script=<(android_linker_script)',
81 ],
82 'ldflags!': [
83 '-Wl,--exclude-libs=ALL',
84 ],
85 },
86 }],
87 ],
88 }],
89 ],
65 } 90 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | build/jni_generator.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698