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

Side by Side Diff: build/java.gypi

Issue 23213002: Add support for proguard preprocessing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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',
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 'generated_R_dirs': [], 63 'generated_R_dirs': [],
64 'has_java_resources%': 0, 64 'has_java_resources%': 0,
65 'java_strings_grd%': '', 65 'java_strings_grd%': '',
66 'res_extra_dirs': [], 66 'res_extra_dirs': [],
67 'res_extra_files': [], 67 'res_extra_files': [],
68 'res_v14_verify_only%': 0, 68 'res_v14_verify_only%': 0,
69 'resource_input_paths': ['>@(res_extra_files)'], 69 'resource_input_paths': ['>@(res_extra_files)'],
70 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', 70 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)',
71 'classes_dir': '<(intermediate_dir)/classes', 71 'classes_dir': '<(intermediate_dir)/classes',
72 'compile_stamp': '<(intermediate_dir)/compile.stamp', 72 'compile_stamp': '<(intermediate_dir)/compile.stamp',
73 'proguard_config%': '',
74 'proguard_preprocess%': '0',
75 'variables': {
76 'variables': {
77 'proguard_preprocess%': 0,
78 },
79 'conditions': [
80 ['proguard_preprocess == 1', {
81 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar'
82 }, {
83 'javac_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)'
84 }],
85 ],
86 },
87 'javac_jar_path': '<(javac_jar_path)',
73 }, 88 },
74 # This all_dependent_settings is used for java targets only. This will add the 89 # This all_dependent_settings is used for java targets only. This will add the
75 # jar path to the classpath of dependent java targets. 90 # jar path to the classpath of dependent java targets.
76 'all_dependent_settings': { 91 'all_dependent_settings': {
77 'variables': { 92 'variables': {
78 'input_jars_paths': ['<(jar_path)'], 93 'input_jars_paths': ['<(jar_path)'],
79 'library_dexed_jars_paths': ['<(dex_path)'], 94 'library_dexed_jars_paths': ['<(dex_path)'],
80 }, 95 },
81 }, 96 },
82 'conditions': [ 97 'conditions': [
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 'action': [ 226 'action': [
212 'python', '<(DEPTH)/build/android/gyp/generate_v14_compatible_resour ces.py', 227 'python', '<(DEPTH)/build/android/gyp/generate_v14_compatible_resour ces.py',
213 '--res-dir=<(res_dir)', 228 '--res-dir=<(res_dir)',
214 '--res-v14-compatibility-dir=<(res_v14_compatibility_dir)', 229 '--res-v14-compatibility-dir=<(res_v14_compatibility_dir)',
215 '--stamp', '<(res_v14_compatibility_stamp)', 230 '--stamp', '<(res_v14_compatibility_stamp)',
216 '<@(res_v14_additional_options)', 231 '<@(res_v14_additional_options)',
217 ] 232 ]
218 }, 233 },
219 ], 234 ],
220 }], 235 }],
236 ['proguard_preprocess == 1', {
237 'actions': [
238 {
239 'action_name': 'proguard_<(_target_name)',
240 'message': 'Proguard preprocessing <(_target_name) jar',
241 'inputs': [
242 '<(DEPTH)/build/android/gyp/util/build_utils.py',
243 '<(DEPTH)/build/android/gyp/proguard.py',
244 '<(javac_jar_path)',
245 '<(proguard_config)',
246 ],
247 'outputs': [
248 '<(jar_path)',
249 ],
250 'action': [
251 'python', '<(DEPTH)/build/android/gyp/proguard.py',
252 '--proguard-path=<(android_sdk_root)/tools/proguard/bin/proguard.sh' ,
nyquist 2013/08/14 22:19:10 Add this to inputs? Or do we consider that never t
nyquist 2013/08/14 23:24:12 Done.
253 '--input-path=<(javac_jar_path)',
254 '--output-path=<(jar_path)',
255 '--proguard-config=<(proguard_config)',
256 '--classpath=<(android_sdk_jar) >(input_jars_paths)',
257
258 # TODO(newt): remove this once http://crbug.com/177552 is fixed in n inja.
259 '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
260 ]
261 },
262 ],
263 }],
221 ], 264 ],
222 'actions': [ 265 'actions': [
223 { 266 {
224 'action_name': 'javac_<(_target_name)', 267 'action_name': 'javac_<(_target_name)',
225 'message': 'Compiling <(_target_name) java sources', 268 'message': 'Compiling <(_target_name) java sources',
226 'variables': { 269 'variables': {
227 'all_src_dirs': [ 270 'all_src_dirs': [
228 '>(java_in_dir)/src', 271 '>(java_in_dir)/src',
229 '>@(additional_src_dirs)', 272 '>@(additional_src_dirs)',
230 '>@(generated_src_dirs)', 273 '>@(generated_src_dirs)',
(...skipping 25 matching lines...) Expand all
256 { 299 {
257 'action_name': 'jar_<(_target_name)', 300 'action_name': 'jar_<(_target_name)',
258 'message': 'Creating <(_target_name) jar', 301 'message': 'Creating <(_target_name) jar',
259 'inputs': [ 302 'inputs': [
260 '<(DEPTH)/build/android/gyp/util/build_utils.py', 303 '<(DEPTH)/build/android/gyp/util/build_utils.py',
261 '<(DEPTH)/build/android/gyp/util/md5_check.py', 304 '<(DEPTH)/build/android/gyp/util/md5_check.py',
262 '<(DEPTH)/build/android/gyp/jar.py', 305 '<(DEPTH)/build/android/gyp/jar.py',
263 '<(compile_stamp)', 306 '<(compile_stamp)',
264 ], 307 ],
265 'outputs': [ 308 'outputs': [
266 '<(jar_path)', 309 '<(javac_jar_path)',
267 ], 310 ],
268 'action': [ 311 'action': [
269 'python', '<(DEPTH)/build/android/gyp/jar.py', 312 'python', '<(DEPTH)/build/android/gyp/jar.py',
270 '--classes-dir=<(classes_dir)', 313 '--classes-dir=<(classes_dir)',
271 '--jar-path=<(jar_path)', 314 '--jar-path=<(javac_jar_path)',
272 '--excluded-classes=<(jar_excluded_classes)', 315 '--excluded-classes=<(jar_excluded_classes)',
273 316
274 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . 317 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja .
275 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', 318 '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
276 ] 319 ]
277 }, 320 },
278 { 321 {
279 'action_name': 'jar_toc_<(_target_name)', 322 'action_name': 'jar_toc_<(_target_name)',
280 'message': 'Creating <(_target_name) jar.TOC', 323 'message': 'Creating <(_target_name) jar.TOC',
281 'inputs': [ 324 'inputs': [
(...skipping 17 matching lines...) Expand all
299 { 342 {
300 'action_name': 'dex_<(_target_name)', 343 'action_name': 'dex_<(_target_name)',
301 'variables': { 344 'variables': {
302 'dex_input_paths': [ '<(jar_path)' ], 345 'dex_input_paths': [ '<(jar_path)' ],
303 'output_path': '<(dex_path)', 346 'output_path': '<(dex_path)',
304 }, 347 },
305 'includes': [ 'android/dex_action.gypi' ], 348 'includes': [ 'android/dex_action.gypi' ],
306 }, 349 },
307 ], 350 ],
308 } 351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698