media/webrtc/trunk/build/jar_file_jni_generator.gypi

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
michael@0 2 # Use of this source code is governed by a BSD-style license that can be
michael@0 3 # found in the LICENSE file.
michael@0 4
michael@0 5 # This file is meant to be included into a target to provide a rule
michael@0 6 # to generate jni bindings for system Java-files in a consistent manner.
michael@0 7 #
michael@0 8 # To use this, create a gyp target with the following form:
michael@0 9 # {
michael@0 10 # 'target_name': 'android_jar_jni_headers',
michael@0 11 # 'type': 'none',
michael@0 12 # 'variables': {
michael@0 13 # 'jni_gen_dir': 'chrome',
michael@0 14 # 'input_java_class': 'java/io/InputStream.class',
michael@0 15 # 'input_jar_file': '<(android_sdk)/android.jar',
michael@0 16 # },
michael@0 17 # 'includes': [ '../build/jar_file_jni_generator.gypi' ],
michael@0 18 # },
michael@0 19
michael@0 20 {
michael@0 21 'variables': {
michael@0 22 'jni_generator': '<(DEPTH)/base/android/jni_generator/jni_generator.py',
michael@0 23 },
michael@0 24 'actions': [
michael@0 25 {
michael@0 26 'action_name': 'generate_jni_headers_from_jar_file',
michael@0 27 'inputs': [
michael@0 28 '<(jni_generator)',
michael@0 29 '<(input_jar_file)',
michael@0 30 ],
michael@0 31 'variables': {
michael@0 32 'java_class_name': '<!(basename <(input_java_class)|sed "s/\.class//")'
michael@0 33 },
michael@0 34 'outputs': [
michael@0 35 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_dir)/jni/<(java_class_name)_jni.h',
michael@0 36 ],
michael@0 37 'action': [
michael@0 38 '<(jni_generator)',
michael@0 39 '-j',
michael@0 40 '<(input_jar_file)',
michael@0 41 '--input_file',
michael@0 42 '<(input_java_class)',
michael@0 43 '--output_dir',
michael@0 44 '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_dir)/jni',
michael@0 45 ],
michael@0 46 'message': 'Generating JNI bindings from <(input_jar_file)/<(input_java_class)',
michael@0 47 'process_outputs_as_sources': 1,
michael@0 48 },
michael@0 49 ],
michael@0 50 # This target exports a hard dependency because it generates header
michael@0 51 # files.
michael@0 52 'hard_dependency': 1,
michael@0 53 }

mercurial