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

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

Issue 1118403004: Adds GN rule & script for generating AndroidManifest.xml for APK splits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaked generate_split_manifest GN template so that action is at top Created 5 years, 7 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/android/gyp/generate_split_manifest.py ('k') | tools/telemetry/telemetry/TELEMETRY_DEPS » ('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 2a7a8921ed37fbd994a208877a58ec7ab52a0bca..07a05e15d6406f3853c6c1a87b3833e2c59f149b 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -1177,3 +1177,53 @@ template("deps_dex") {
}
}
}
+
+# Creates an AndroidManifest.xml for an APK split.
+template("generate_split_manifest") {
+ assert(defined(invoker.main_manifest))
+ assert(defined(invoker.out_manifest))
+ assert(defined(invoker.split_name))
+
+ action(target_name) {
+ depfile = "$target_gen_dir/$target_name.d"
+ args = [
+ "--main-manifest",
+ rebase_path(invoker.main_manifest, root_build_dir),
+ "--out-manifest",
+ rebase_path(invoker.out_manifest, root_build_dir),
+ "--split",
+ invoker.split_name,
+ ]
+ if (defined(invoker.version_code)) {
+ args += [
+ "--version-code",
+ invoker.version_code,
+ ]
+ }
+ if (defined(invoker.version_name)) {
+ args += [
+ "--version-name",
+ invoker.version_name,
+ ]
+ }
+ if (defined(invoker.has_code)) {
+ args += [
+ "--has-code",
+ invoker.has_code,
+ ]
+ }
+ args += [
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
+ ]
+
+ script = "//build/android/gyp/generate_split_manifest.py"
+ outputs = [
+ depfile,
+ invoker.out_manifest,
+ ]
+ inputs = [
+ invoker.main_manifest,
+ ]
+ }
+}
« no previous file with comments | « build/android/gyp/generate_split_manifest.py ('k') | tools/telemetry/telemetry/TELEMETRY_DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698