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

Unified Diff: build/java_apk.gypi

Issue 193693002: android: Pass (non-generated) .java files via a gyp filelist to javac.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addsrc Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/java.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java_apk.gypi
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index f9387cd2d6675bc98c5bfeddda2d52a99e1a205b..0431f9d74423e84b1022cd6dbf85ff3f688071cc 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -513,19 +513,27 @@
'action_name': 'javac_<(_target_name)',
'message': 'Compiling java for <(_target_name)',
'variables': {
- 'all_src_dirs': [
- '<(java_in_dir)/src',
+ 'gen_src_dirs': [
'<(intermediate_dir)/gen',
- '>@(additional_src_dirs)',
'>@(generated_src_dirs)',
],
+ # If there is a separate find for additional_src_dirs, it will find the
+ # wrong .java files when additional_src_dirs is empty.
+ # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and
+ # java_apk.gypi evaluate the same command, and at the moment two targets
+ # set java_in_dir to "java". Add a dummy comment here to make sure
+ # that the two targets (one uses java.gypi, the other java_apk.gypi)
+ # get distinct source lists. Medium-term, make targets list all their
+ # Java files instead of using find. (As is, this will be broken if two
+ # targets use the same java_in_dir and both use java_apk.gypi or
+ # both use java.gypi.)
+ 'java_source_list': '>|(javasources.<(_target_name).gypcmd >!@(find >(java_in_dir)/src >(additional_src_dirs) -name "*.java" # apk))',
+
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/javac.py',
- # If there is a separate find for additional_src_dirs, it will find the
- # wrong .java files when additional_src_dirs is empty.
- '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")',
+ '>(java_source_list)',
'>@(input_jars_paths)',
'<(codegen_stamp)',
'>@(compile_input_paths)',
@@ -537,7 +545,8 @@
'python', '<(DEPTH)/build/android/gyp/javac.py',
'--output-dir=<(classes_dir)',
'--classpath=>(input_jars_paths) <(android_sdk_jar)',
- '--src-dirs=>(all_src_dirs)',
+ '--src-filelist=>(java_source_list)',
+ '--src-gendirs=>(gen_src_dirs)',
'--javac-includes=<(javac_includes)',
'--chromium-code=<(chromium_code)',
'--stamp=<(compile_stamp)',
« no previous file with comments | « build/java.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698