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

Unified Diff: build/config/android/internal_rules.gni

Issue 2545793002: Android: Add java files from android_apk targets (Closed)
Patch Set: Explicit is better than implicit. Created 4 years 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 | « no previous file | build/config/android/rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/internal_rules.gni
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 27b736f36a2ecff0212d284c25e6ddf2c7aa01a8..48fcbc4e71891f8a8c32cedea9a369fe1570c889 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -2245,6 +2245,11 @@ if (enable_java_templates) {
_accumulated_deps = invoker.deps
}
+ # Caller overriding build config must have valid java sources file if it has
+ # java files.
+ assert(!defined(invoker.override_build_config) ||
+ !defined(invoker.java_files) || defined(invoker.java_sources_file))
+
assert(defined(invoker.java_files) || defined(invoker.srcjars) ||
defined(invoker.srcjar_deps))
_base_path = "$target_gen_dir/$target_name"
@@ -2326,7 +2331,11 @@ if (enable_java_templates) {
_java_files += invoker.java_files
}
if (_java_files != []) {
- _java_sources_file = "$_base_path.sources"
+ if (defined(invoker.java_sources_file)) {
+ _java_sources_file = invoker.java_sources_file
+ } else {
+ _java_sources_file = "$_base_path.sources"
+ }
write_file(_java_sources_file, rebase_path(_java_files, root_build_dir))
}
« no previous file with comments | « no previous file | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698