summaryrefslogtreecommitdiffstats
path: root/build/java_apk.gypi
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-23 18:42:13 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-23 18:42:13 +0000
commita78eb479c9ac0985972598afa765a32e1a6f9745 (patch)
tree70a30c398257a7f4098f94f1cd69b60b7e80bdd5 /build/java_apk.gypi
parenta94f76e7ce54a4b727160387e7c63015e317ca89 (diff)
downloadchromium_src-a78eb479c9ac0985972598afa765a32e1a6f9745.zip
chromium_src-a78eb479c9ac0985972598afa765a32e1a6f9745.tar.gz
chromium_src-a78eb479c9ac0985972598afa765a32e1a6f9745.tar.bz2
Make javac and jar a single build action
This allows us to more accurately specify the outputs of each action (we can't specify the .class file outputs easily because determing them essentially requires compiling the .java files). The lint action still operates directly on the .class files, so we continue to support specifying a directory for the .class files (but in a very simple to remove way). BUG=359249 Review URL: https://codereview.chromium.org/328893003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java_apk.gypi')
-rw-r--r--build/java_apk.gypi50
1 files changed, 16 insertions, 34 deletions
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index 92c8cfa..5f3653d 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -94,10 +94,10 @@
'jar_stamp': '<(intermediate_dir)/jar.stamp',
'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp',
'strip_stamp': '<(intermediate_dir)/strip.stamp',
- 'classes_dir': '<(intermediate_dir)/classes',
- 'classes_final_dir': '<(intermediate_dir)/classes_instr',
+ 'classes_dir': '<(intermediate_dir)/classes/2',
'javac_includes': [],
'jar_excluded_classes': [],
+ 'javac_jar_path': '<(intermediate_dir)/<(_target_name).javac.jar',
'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar',
'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar',
@@ -153,7 +153,6 @@
'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)',
'extra_native_libs': [],
- 'apk_dex_input_paths': [ '>@(library_dexed_jars_paths)' ],
},
# Pass the jar path to the apk's "fake" jar target. This would be better as
# direct_dependent_settings, but a variable set by a direct_dependent_settings
@@ -540,14 +539,17 @@
],
'outputs': [
'<(compile_stamp)',
+ '<(javac_jar_path)',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/javac.py',
- '--output-dir=<(classes_dir)',
+ '--classes-dir=<(classes_dir)',
'--classpath=>(input_jars_paths) <(android_sdk_jar)',
'--src-gendirs=>(gen_src_dirs)',
'--javac-includes=<(javac_includes)',
'--chromium-code=<(chromium_code)',
+ '--jar-path=<(javac_jar_path)',
+ '--jar-excluded-classes=<(jar_excluded_classes)',
'--stamp=<(compile_stamp)',
'>@(java_sources)',
],
@@ -571,42 +573,22 @@
'includes': [ 'android/lint_action.gypi' ],
},
{
- 'action_name': 'instr_classes_<(_target_name)',
- 'message': 'Instrumenting <(_target_name) classes',
+ 'action_name': 'instr_jar_<(_target_name)',
+ 'message': 'Instrumenting <(_target_name) jar',
'variables': {
- 'input_path': '<(classes_dir)',
- 'output_path': '<(classes_final_dir)',
+ 'input_path': '<(javac_jar_path)',
+ 'output_path': '<(jar_path)',
'stamp_path': '<(instr_stamp)',
- 'instr_type': 'classes',
+ 'instr_type': 'jar',
},
- 'inputs': [
- '<(compile_stamp)',
- ],
'outputs': [
'<(instr_stamp)',
+ '<(jar_path)',
],
- 'includes': [ 'android/instr_action.gypi' ],
- },
- {
- 'action_name': 'jar_<(_target_name)',
- 'message': 'Creating <(_target_name) jar',
'inputs': [
- '<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/util/md5_check.py',
- '<(DEPTH)/build/android/gyp/jar.py',
- '<(instr_stamp)',
+ '<(javac_jar_path)',
],
- 'outputs': [
- '<(jar_stamp)',
- '<(jar_path)',
- ],
- 'action': [
- 'python', '<(DEPTH)/build/android/gyp/jar.py',
- '--classes-dir=<(classes_final_dir)',
- '--jar-path=<(jar_path)',
- '--excluded-classes=<(jar_excluded_classes)',
- '--stamp=<(jar_stamp)',
- ]
+ 'includes': [ 'android/instr_action.gypi' ],
},
{
'action_name': 'obfuscate_<(_target_name)',
@@ -696,11 +678,11 @@
{
'action_name': 'dex_<(_target_name)',
'variables': {
- 'output_path': '<(dex_path)',
'dex_input_paths': [
- '>@(apk_dex_input_paths)',
+ '>@(library_dexed_jars_paths)',
'<(jar_path)',
],
+ 'output_path': '<(dex_path)',
'proguard_enabled_input_path': '<(obfuscated_jar_path)',
},
'target_conditions': [