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

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

Issue 411543005: Encode all grit outputs in .gn files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « ash/strings/BUILD.gn ('k') | build/secondary/chrome/BUILD.gn » ('j') | 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 662a501fc55a49657b92c153f5799e312efc6ee7..f18c86a4bc6e85289ba53c96bcad012ea5f0bdd6 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -335,6 +335,7 @@ template("android_resources") {
# Variables
# deps: Specifies the dependencies of this target.
# grd_file: Path to the .grd file to generate strings.xml from.
+# outputs: Expected grit outputs (see grit rule).
#
# Example
# java_strings_grd("foo_strings_grd") {
@@ -351,8 +352,11 @@ template("java_strings_grd") {
}
}
+ # Put grit files into this subdirectory of target_gen_dir.
+ extra_output_path = target_name + "_grit_output"
+
grit_target_name = "${target_name}__grit"
- grit_output_dir = base_path + "_grit_output"
+ grit_output_dir = "$target_gen_dir/$extra_output_path"
grit(grit_target_name) {
grit_flags = [
"-E", "ANDROID_JAVA_TAGGED_ONLY=false",
@@ -360,6 +364,10 @@ template("java_strings_grd") {
output_dir = grit_output_dir
resource_ids = ""
source = invoker.grd_file
+ # The grit rule expects files relative to target_gen_dir, but this rule
+ # appends a suffix to that. This rebase will prepend extra_output_path to
+ # each filename.
+ outputs = rebase_path(invoker.outputs, ".", extra_output_path)
}
# This needs to get outputs from grit's internal target, not the final
« no previous file with comments | « ash/strings/BUILD.gn ('k') | build/secondary/chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698