Chromium Code Reviews| Index: build/java.gypi |
| diff --git a/build/java.gypi b/build/java.gypi |
| index 1635c71da40db66cfee1a1737cc9089057ec378c..66a730c0671d0de21a75515c847bb41a8bd34533 100644 |
| --- a/build/java.gypi |
| +++ b/build/java.gypi |
| @@ -70,6 +70,21 @@ |
| 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', |
| 'classes_dir': '<(intermediate_dir)/classes', |
| 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
| + 'proguard_config%': '', |
| + 'proguard_preprocess%': '0', |
| + 'variables': { |
| + 'variables': { |
| + 'proguard_preprocess%': 0, |
| + }, |
| + 'conditions': [ |
| + ['proguard_preprocess == 1', { |
| + 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar' |
| + }, { |
| + 'javac_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)' |
| + }], |
| + ], |
| + }, |
| + 'javac_jar_path': '<(javac_jar_path)', |
| }, |
| # This all_dependent_settings is used for java targets only. This will add the |
| # jar path to the classpath of dependent java targets. |
| @@ -218,6 +233,34 @@ |
| }, |
| ], |
| }], |
| + ['proguard_preprocess == 1', { |
| + 'actions': [ |
| + { |
| + 'action_name': 'proguard_<(_target_name)', |
| + 'message': 'Proguard preprocessing <(_target_name) jar', |
| + 'inputs': [ |
| + '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| + '<(DEPTH)/build/android/gyp/proguard.py', |
| + '<(javac_jar_path)', |
| + '<(proguard_config)', |
| + ], |
| + 'outputs': [ |
| + '<(jar_path)', |
| + ], |
| + 'action': [ |
| + 'python', '<(DEPTH)/build/android/gyp/proguard.py', |
| + '--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.
|
| + '--input-path=<(javac_jar_path)', |
| + '--output-path=<(jar_path)', |
| + '--proguard-config=<(proguard_config)', |
| + '--classpath=<(android_sdk_jar) >(input_jars_paths)', |
| + |
| + # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. |
| + '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| + ] |
| + }, |
| + ], |
| + }], |
| ], |
| 'actions': [ |
| { |
| @@ -263,12 +306,12 @@ |
| '<(compile_stamp)', |
| ], |
| 'outputs': [ |
| - '<(jar_path)', |
| + '<(javac_jar_path)', |
| ], |
| 'action': [ |
| 'python', '<(DEPTH)/build/android/gyp/jar.py', |
| '--classes-dir=<(classes_dir)', |
| - '--jar-path=<(jar_path)', |
| + '--jar-path=<(javac_jar_path)', |
| '--excluded-classes=<(jar_excluded_classes)', |
| # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. |