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

Side by Side Diff: build/java.gypi

Issue 11308030: Use _target_name instead of package_name for java*.gypi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@apk_jar
Patch Set: Created 8 years, 1 month 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
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 build Java in a consistent manner. 6 # to build Java 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': 'my-package_java', 10 # 'target_name': 'my-package_java',
11 # 'type': 'none', 11 # 'type': 'none',
12 # 'variables': { 12 # 'variables': {
13 # 'package_name': 'my-package',
14 # 'java_in_dir': 'path/to/package/root', 13 # 'java_in_dir': 'path/to/package/root',
15 # }, 14 # },
16 # 'includes': ['path/to/this/gypi/file'], 15 # 'includes': ['path/to/this/gypi/file'],
17 # } 16 # }
18 # 17 #
19 # The generated jar-file will be: 18 # The generated jar-file will be:
20 # <(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar 19 # <(PRODUCT_DIR)/lib.java/chromium_<(_target_name).jar
Yaron 2012/11/08 02:43:11 I didn't know _target_name existed!
21 # Required variables: 20 # 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 21 # java_in_dir - The top-level java directory. The src should be in
25 # <java_in_dir>/src. 22 # <java_in_dir>/src.
26 # Optional/automatic variables: 23 # Optional/automatic variables:
27 # additional_input_paths - These paths will be included in the 'inputs' list to 24 # 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. 25 # ensure that this target is rebuilt when one of these paths changes.
29 # additional_src_dirs - Additional directories with .java files to be compiled 26 # additional_src_dirs - Additional directories with .java files to be compiled
30 # and included in the output of this target. 27 # and included in the output of this target.
31 # generated_src_dirs - Same as additional_src_dirs except used for .java files 28 # 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 29 # 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 30 # target's dependencies. The .java files in these directories are not
34 # included in the 'inputs' list (unlike additional_src_dirs). 31 # included in the 'inputs' list (unlike additional_src_dirs).
35 # input_jars_paths - The path to jars to be included in the classpath. This 32 # 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. 33 # should be filled automatically by depending on the appropriate targets.
37 34
38 { 35 {
39 'dependencies': [ 36 'dependencies': [
40 '<(DEPTH)/build/build_output_dirs_android.gyp:build_output_dirs' 37 '<(DEPTH)/build/build_output_dirs_android.gyp:build_output_dirs'
41 ], 38 ],
42 # This all_dependent_settings is used for java targets only. This will add the 39 # 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. 40 # chromium_<(_target_name) jar to the classpath of dependent java targets.
44 'all_dependent_settings': { 41 'all_dependent_settings': {
45 'variables': { 42 'variables': {
46 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar '], 43 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_<(_target_name).jar '],
47 }, 44 },
48 }, 45 },
49 'variables': { 46 'variables': {
50 'input_jars_paths': [], 47 'input_jars_paths': [],
51 'additional_src_dirs': [], 48 'additional_src_dirs': [],
52 'additional_input_paths': [], 49 'additional_input_paths': [],
53 'generated_src_dirs': [], 50 'generated_src_dirs': [],
54 }, 51 },
55 'actions': [ 52 'actions': [
56 { 53 {
57 'action_name': 'ant_<(package_name)', 54 'action_name': 'ant_<(_target_name)',
58 'message': 'Building <(package_name) java sources.', 55 'message': 'Building <(_target_name) java sources.',
59 'inputs': [ 56 'inputs': [
60 'android/ant/common.xml', 57 'android/ant/common.xml',
61 'android/ant/chromium-jars.xml', 58 'android/ant/chromium-jars.xml',
62 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', 59 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")',
63 '>@(input_jars_paths)', 60 '>@(input_jars_paths)',
64 '>@(additional_input_paths)', 61 '>@(additional_input_paths)',
65 ], 62 ],
66 'outputs': [ 63 'outputs': [
67 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar', 64 '<(PRODUCT_DIR)/lib.java/chromium_<(_target_name).jar',
68 ], 65 ],
69 'action': [ 66 'action': [
70 'ant', 67 'ant',
71 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', 68 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
72 '-DANDROID_SDK=<(android_sdk)', 69 '-DANDROID_SDK=<(android_sdk)',
73 '-DANDROID_SDK_ROOT=<(android_sdk_root)', 70 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
74 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', 71 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
75 '-DANDROID_SDK_VERSION=<(android_sdk_version)', 72 '-DANDROID_SDK_VERSION=<(android_sdk_version)',
76 '-DANDROID_GDBSERVER=<(android_gdbserver)', 73 '-DANDROID_GDBSERVER=<(android_gdbserver)',
77 '-DPRODUCT_DIR=<(ant_build_out)', 74 '-DPRODUCT_DIR=<(ant_build_out)',
78 75
79 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', 76 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)',
80 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', 77 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)',
81 '-DINPUT_JARS_PATHS=>(input_jars_paths)', 78 '-DINPUT_JARS_PATHS=>(input_jars_paths)',
82 '-DPACKAGE_NAME=<(package_name)', 79 '-DJAR_NAME=chromium_<(_target_name).jar',
Yaron 2012/11/08 02:43:11 Why do we have the "chromium_" prefix? What could
cjhopman 2012/12/05 00:51:04 I've removed the prefix, there's nothing that we s
80 '-DOUT_DIR=<(PRODUCT_DIR)/<(_target_name)',
Yaron 2012/11/08 02:43:11 OUT_DIR doesn't appear to be used by chromium-jars
cjhopman 2012/12/05 00:51:04 Done. To be consistent with chromium-apks.xml and
81 '-DTARGET_NAME=<(_target_name)',
83 82
84 '-Dbasedir=<(java_in_dir)', 83 '-Dbasedir=<(java_in_dir)',
85 '-buildfile', 84 '-buildfile',
86 '<(DEPTH)/build/android/ant/chromium-jars.xml' 85 '<(DEPTH)/build/android/ant/chromium-jars.xml'
87 ] 86 ]
88 }, 87 },
89 ], 88 ],
90 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698