Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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.
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',
11 # 'type': 'none',
12 # 'variables': {
13 # 'package_name': 'my-package',
14 # 'java_in_dir': 'path/to/package/root',
15 # },
16 # 'includes': ['path/to/this/gypi/file'],
17 # }
18 #
19 # The generated jar-file will be:
20 # <(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar
21 # Required variables:
22 # package_name - Used to name the intermediate output directory and in the
23 # names of some output files.
24 # java_in_dir - The top-level java directory. The src should be in
25 # <java_in_dir>/src.
26 # Optional/automatic variables:
27 # additional_input_paths - These paths will be included in the 'inputs' list to
28 # ensure that this target is rebuilt when one of these paths changes.
29 # additional_src_dirs - Additional directories with .java files to be compiled
30 # and included in the output of this target.
31 # generated_src_dirs - Same as additional_src_dirs except used for .java files
32 # that are generated at build time. This should be set automatically by a
33 # target's dependencies. The .java files in these directories are not
34 # included in the 'inputs' list (unlike additional_src_dirs).
35 # input_jars_paths - The path to jars to be included in the classpath. This
36 # should be filled automatically by depending on the appropriate targets.
38 {
39 'dependencies': [
40 '<(DEPTH)/build/build_output_dirs_android.gyp:build_output_dirs'
41 ],
42 # This all_dependent_settings is used for java targets only. This will add the
43 # chromium_<(package_name) jar to the classpath of dependent java targets.
44 'all_dependent_settings': {
45 'variables': {
46 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar'],
47 },
48 },
49 'variables': {
50 'input_jars_paths': [],
51 'additional_src_dirs': [],
52 'additional_input_paths': [],
53 'generated_src_dirs': [],
54 },
55 'actions': [
56 {
57 'action_name': 'ant_<(package_name)',
58 'message': 'Building <(package_name) java sources.',
59 'inputs': [
60 'android/ant/common.xml',
61 'android/ant/chromium-jars.xml',
62 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")',
63 '>@(input_jars_paths)',
64 '>@(additional_input_paths)',
65 ],
66 'outputs': [
67 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar',
68 ],
69 'action': [
70 'ant',
71 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
72 '-DANDROID_SDK=<(android_sdk)',
73 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
74 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
75 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
76 '-DANDROID_GDBSERVER=<(android_gdbserver)',
77 '-DPRODUCT_DIR=<(ant_build_out)',
79 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)',
80 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)',
81 '-DINPUT_JARS_PATHS=>(input_jars_paths)',
82 '-DPACKAGE_NAME=<(package_name)',
84 '-Dbasedir=<(java_in_dir)',
85 '-buildfile',
86 '<(DEPTH)/build/android/ant/chromium-jars.xml'
87 ]
88 },
89 ],
90 }