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

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

Issue 1348533007: GN: Use a custom script for package_apk() build step rather than ANT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md5-check-4
Patch Set: review commetns Created 5 years, 3 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/apkbuilder.py ('k') | no next file » | 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 072da6e002d4a69dc4952caa81e027e95aa693ff..3aa217973a343cb2b4b0ee6be87ba16aa21fb176 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -483,15 +483,12 @@ template("package_apk") {
"public_deps",
"testonly",
])
- script = "//build/android/gyp/ant.py"
- _ant_script = "//build/android/ant/apk-package.xml"
-
+ script = "//build/android/gyp/apkbuilder.py"
depfile = "$target_gen_dir/$target_name.d"
data_deps = [ "//tools/android/md5sum" ] # Used when deploying APKs
inputs = [
invoker.resource_packaged_apk_path,
- _ant_script,
]
if (defined(invoker.dex_path)) {
inputs += [ invoker.dex_path ]
@@ -502,39 +499,27 @@ template("package_apk") {
invoker.output_apk_path,
]
- _rebased_emma_jar = ""
_rebased_resource_packaged_apk_path =
rebase_path(invoker.resource_packaged_apk_path, root_build_dir)
_rebased_packaged_apk_path =
rebase_path(invoker.output_apk_path, root_build_dir)
- _rebased_native_libs_dir =
- rebase_path(invoker.native_libs_dir, root_build_dir)
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
- "--",
- "-quiet",
- "-DANDROID_SDK_ROOT=$rebased_android_sdk_root",
- "-DANDROID_SDK_TOOLS=$rebased_android_sdk_build_tools",
- "-DRESOURCE_PACKAGED_APK_NAME=$_rebased_resource_packaged_apk_path",
- "-DCONFIGURATION_NAME=$android_configuration_name",
- "-DNATIVE_LIBS_DIR=$_rebased_native_libs_dir",
- "-DOUT_DIR=",
- "-DUNSIGNED_APK_PATH=$_rebased_packaged_apk_path",
- "-DEMMA_INSTRUMENT=0",
- "-DEMMA_DEVICE_JAR=$_rebased_emma_jar",
- "-Dbasedir=.",
- "-buildfile",
- rebase_path(_ant_script, root_build_dir),
+ "--resource-apk=$_rebased_resource_packaged_apk_path",
+ "--output-apk=$_rebased_packaged_apk_path",
]
if (defined(invoker.dex_path)) {
_rebased_dex_path = rebase_path(invoker.dex_path, root_build_dir)
+ args += [ "--dex-file=$_rebased_dex_path" ]
+ }
+ if (defined(invoker.native_libs_dir)) {
+ _rebased_native_libs_dir =
+ rebase_path(invoker.native_libs_dir, root_build_dir)
args += [
- "-DDEX_FILE_PATH=$_rebased_dex_path",
- "-DHAS_CODE=true",
+ "--native-libs-dir=$_rebased_native_libs_dir/$android_app_abi",
+ "--android-abi=$android_app_abi",
]
- } else {
- args += [ "-DHAS_CODE=false" ]
}
}
}
@@ -632,11 +617,6 @@ template("create_apk") {
_incremental_deps = invoker.incremental_deps
}
- _native_libs_dir = "//build/android/empty/res"
- if (defined(invoker.native_libs_dir)) {
- _native_libs_dir = invoker.native_libs_dir
- }
-
if (defined(invoker.asset_location)) {
_asset_location = invoker.asset_location
assert(_asset_location != "") # Mark as used.
@@ -801,12 +781,13 @@ template("create_apk") {
package_target = "${target_name}__package"
package_apk(package_target) {
+ forward_variables_from(invoker, [ "native_libs_dir" ])
deps = _deps + [ ":${_package_resources_target_name}" ]
if (defined(_dex_path)) {
dex_path = _dex_path
}
- native_libs_dir = _native_libs_dir
+
output_apk_path = _packaged_apk_path
resource_packaged_apk_path = _resource_packaged_apk_path
}
@@ -825,7 +806,6 @@ template("create_apk") {
}
# TODO(agrieve): Add a placeholder .so for http://crbug.com/384638
- native_libs_dir = "//build/android/empty/res"
output_apk_path = _incremental_packaged_apk_path
resource_packaged_apk_path = _incremental_resource_packaged_apk_path
}
« no previous file with comments | « build/android/gyp/apkbuilder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698