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

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

Issue 1681223007: Android Add java_group() template to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maintain ordering Created 4 years, 10 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/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index d72242c1225605a2b64775a2f8ccdd7e22281348..debc80ddadd5a3a07be449ff6de2a22d3e40bb53 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -746,6 +746,27 @@ template("android_assets") {
}
}
+# Declare a group() that supports forwarding java dependency information.
+#
+# Example
+# java_group("conditional_deps") {
+# if (enable_foo) {
+# deps = [":foo_java"]
+# }
+# }
+template("java_group") {
+ write_build_config("${target_name}__build_config") {
+ forward_variables_from(invoker, [ "deps" ])
+ type = "group"
+ build_config = "$target_gen_dir/${invoker.target_name}.build_config"
+ }
+ group(target_name) {
+ deps = []
+ forward_variables_from(invoker, "*")
+ deps += [ ":${target_name}__build_config" ]
+ }
+}
+
# Declare a target that generates localized strings.xml from a .grd file.
#
# If this target is included in the deps of an android resources/library/apk,
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698