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

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

Issue 2474053003: GN: Allow java_* to set their .jar name (Closed)
Patch Set: Implement output_name for java targets Created 4 years, 1 month 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 69140416cc3d7f11af78a28b5891a2b2250ea6b2..f228bacb7f2fec4fc605562fb6b79c418ef682e4 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -34,8 +34,6 @@ _java_target_whitelist = [
"//build/android/pylib/device/commands:chromium_commands",
"//build/android/rezip:rezip",
"//chrome/test/android/cast_emulator:cast_emulator",
- "//components/cronet/android:cronet_api",
- "//components/cronet/android:cronet_javadoc_classpath",
"//mojo/public/java:bindings",
"//third_party/android_tools:emma_device",
"//third_party/cardboard-java:cardboard-java",
@@ -1738,14 +1736,19 @@ if (enable_java_templates) {
defined(invoker.supports_android) && invoker.supports_android
assert(defined(invoker.jar_path))
+ if (defined(invoker.output_name)) {
+ _output_name = invoker.output_name
+ } else {
+ _output_name = get_path_info(invoker.jar_path, "name")
+ }
_base_path = "${target_gen_dir}/$target_name"
# 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"
+ _jar_path = "$root_out_dir/lib.java$_target_dir_name/$_output_name.jar"
_ijar_path =
- "$root_out_dir/lib.java$_target_dir_name/$target_name.interface.jar"
+ "$root_out_dir/lib.java$_target_dir_name/$_output_name.interface.jar"
_build_config = _base_path + ".build_config"
if (_supports_android) {
@@ -2173,14 +2176,16 @@ if (enable_java_templates) {
defined(invoker.srcjar_deps))
_base_path = "$target_gen_dir/$target_name"
+ if (defined(invoker.output_name)) {
+ _output_name = invoker.output_name
+ } else {
+ _output_name = target_name
+ }
+
# Jar files can be needed at runtime (by Robolectric tests or java binaries),
# so do not put them under gen/.
- _jar_name = target_name
- if (defined(invoker.jar_name)) {
- _jar_name = invoker.jar_name
- }
target_dir_name = get_label_info(":$target_name", "dir")
- _jar_path = "$root_out_dir/lib.java$target_dir_name/$_jar_name.jar"
+ _jar_path = "$root_out_dir/lib.java$target_dir_name/$_output_name.jar"
if (defined(invoker.jar_path)) {
_jar_path = invoker.jar_path
}
« 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