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

Unified Diff: build/android/BUILD.gn

Issue 2447413003: Write out useful Android GN vars in a non-gradle-specific form. (Closed)
Patch Set: Created 4 years, 2 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 | build/android/gradle/generate_gradle.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/BUILD.gn
diff --git a/build/android/BUILD.gn b/build/android/BUILD.gn
index e483048f744c91468967924c81a8266d36cdc58f..09ae4a2ecc46e9a345ff2013a2245a3858dc5c56 100644
--- a/build/android/BUILD.gn
+++ b/build/android/BUILD.gn
@@ -41,17 +41,17 @@ if (enable_java_templates) {
output_jar = "$root_out_dir/lib.java/android.interface.jar"
}
- _rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir)
-
- # Record GN vars that are needed by generate_gradle.py.
- # One statement per-line to make GN's formatter leave it alone.
+ # Write to a file some GN vars that are useful to scripts that use the output
+ # directory. Format is chosen as easliy importable by both python and bash.
CR = "$0x0A"
- _json = "{$CR"
- _json += " \"android_sdk_root\": \"$_rebased_android_sdk_root\",$CR"
- _json += " \"compile_sdk_version\": \"$android_sdk_version\",$CR"
- _json += " \"build_tools_version\": \"$android_sdk_build_tools_version\"$CR"
- _json += "}$CR"
- write_file("$root_build_dir/gradle/config.json", _json)
+ _data = ""
+ _data += "android_sdk_build_tools=" +
+ rebase_path(android_sdk_build_tools, root_build_dir) + CR
+ _data += "android_sdk_build_tools_version=$android_sdk_build_tools_version$CR"
+ _data +=
+ "android_sdk_root=" + rebase_path(android_sdk_root, root_build_dir) + CR
+ _data += "android_sdk_version=$android_sdk_version$CR"
+ write_file("$root_build_dir/build_vars.txt", _data)
}
# Copy to the lib.unstripped directory so that gdb can easily find it.
« no previous file with comments | « no previous file | build/android/gradle/generate_gradle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698