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

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

Issue 1325133003: GN: Put .jar files in lib.java rather than gen/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | 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 a301550e045583c44a6f206988dca938556f4fd3..26d31fce5c38d9401bcee0037d5727b208a17b5d 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -894,7 +894,11 @@ template("java_prebuilt_impl") {
assert(defined(invoker.jar_path))
_base_path = "${target_gen_dir}/$target_name"
- _jar_path = _base_path + ".jar"
+
+ # Jar files can be needed at runtime (by Robolectric tests or java binaries),
+ # so do not put them under gen/.
+ target_dir_name = get_label_info(":$target_name", "dir")
+ _jar_path = "$root_out_dir/lib.java$target_dir_name/$target_name.jar"
_build_config = _base_path + ".build_config"
if (_supports_android) {
@@ -1155,7 +1159,11 @@ template("java_library_impl") {
defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir) ||
defined(invoker.srcjars) || defined(invoker.srcjar_deps))
_base_path = "$target_gen_dir/$target_name"
- _jar_path = _base_path + ".jar"
+
+ # Jar files can be needed at runtime (by Robolectric tests or java binaries),
+ # so do not put them under gen/.
+ target_dir_name = get_label_info(":$target_name", "dir")
+ _jar_path = "$root_out_dir/lib.java$target_dir_name/$target_name.jar"
if (defined(invoker.jar_path)) {
_jar_path = invoker.jar_path
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698