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

Side by Side Diff: build/config/android/rules.gni

Issue 1291793007: GN(android): Add scripts & runtime logic for installing _managed apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-managed-install
Patch Set: fix compile 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 unified diff | Download patch
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//base/android/linker/config.gni") 5 import("//base/android/linker/config.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/internal_rules.gni") 7 import("//build/config/android/internal_rules.gni")
8 import("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 import("//third_party/android_platform/config.gni") 9 import("//third_party/android_platform/config.gni")
10 import("//tools/grit/grit_rule.gni") 10 import("//tools/grit/grit_rule.gni")
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 if (defined(invoker.android_manifest_dep)) { 1264 if (defined(invoker.android_manifest_dep)) {
1265 _android_manifest_deps = [ invoker.android_manifest_dep ] 1265 _android_manifest_deps = [ invoker.android_manifest_dep ]
1266 } 1266 }
1267 _android_manifest = invoker.android_manifest 1267 _android_manifest = invoker.android_manifest
1268 1268
1269 _rebased_build_config = rebase_path(_build_config, root_build_dir) 1269 _rebased_build_config = rebase_path(_build_config, root_build_dir)
1270 _create_abi_split = 1270 _create_abi_split =
1271 defined(invoker.create_abi_split) && invoker.create_abi_split 1271 defined(invoker.create_abi_split) && invoker.create_abi_split
1272 _create_density_splits = 1272 _create_density_splits =
1273 defined(invoker.create_density_splits) && invoker.create_density_splits 1273 defined(invoker.create_density_splits) && invoker.create_density_splits
1274 _create_language_splits =
1275 defined(invoker.language_splits) && invoker.language_splits != []
1274 1276
1275 # Help GN understand that _create_abi_split is not unused (bug in GN). 1277 # Help GN understand that _create_abi_split is not unused (bug in GN).
1276 assert(_create_abi_split || true) 1278 assert(_create_abi_split || true)
1277 1279
1278 build_config_target = "${_template_name}__build_config" 1280 build_config_target = "${_template_name}__build_config"
1279 write_build_config(build_config_target) { 1281 write_build_config(build_config_target) {
1280 forward_variables_from(invoker, [ "apk_under_test" ]) 1282 forward_variables_from(invoker, [ "apk_under_test" ])
1281 type = "android_apk" 1283 type = "android_apk"
1282 dex_path = final_dex_path 1284 dex_path = final_dex_path
1283 resources_zip = resources_zip_path 1285 resources_zip = resources_zip_path
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 keystore_password = _keystore_password 1572 keystore_password = _keystore_password
1571 1573
1572 native_libs_dir = _native_libs_dir 1574 native_libs_dir = _native_libs_dir
1573 deps = [ 1575 deps = [
1574 ":${_template_name}__prepare_native", 1576 ":${_template_name}__prepare_native",
1575 ":${_manifest_rule}", 1577 ":${_manifest_rule}",
1576 ] 1578 ]
1577 } 1579 }
1578 } 1580 }
1579 1581
1582 _create_incremental_script_rule_name = "${_template_name}__incremental_script"
1583 _incremental_final_deps += [ ":${_create_incremental_script_rule_name}" ]
1584 action(_create_incremental_script_rule_name) {
1585 script = "//build/android/gn/create_incremental_install_script.py"
1586 depfile = "$target_gen_dir/$target_name.d"
1587
1588 _generated_script_path =
1589 "${root_out_dir}/bin/install_incremental_${_template_name}"
1590 outputs = [
1591 depfile,
1592 _generated_script_path,
1593 ]
1594
1595 _rebased_apk_path_no_ext =
1596 rebase_path(_final_apk_path_no_ext, root_build_dir)
1597 _rebased_generated_script_path =
1598 rebase_path(_generated_script_path, root_build_dir)
1599 _rebased_depfile = rebase_path(depfile, root_build_dir)
1600 args = [
1601 "--apk-path=${_rebased_apk_path_no_ext}_incremental.apk",
1602 "--script-output-path=$_rebased_generated_script_path",
1603 "--depfile=$_rebased_depfile",
1604 ]
1605 if (defined(_native_libs_dir)) {
1606 _rebased_native_libs_dir = rebase_path(_native_libs_dir, root_build_dir)
1607 args += [ "--lib-dir=$_rebased_native_libs_dir/$android_app_abi" ]
1608 }
1609 if (_create_density_splits) {
1610 args += [ "--split=${_rebased_apk_path_no_ext}-density-*.apk" ]
1611 }
1612 if (_create_language_splits) {
1613 args += [ "--split=${_rebased_apk_path_no_ext}-language-*.apk" ]
1614 }
1615 }
1616
1580 group(target_name) { 1617 group(target_name) {
1581 forward_variables_from(invoker, [ "data_deps" ]) 1618 forward_variables_from(invoker, [ "data_deps" ])
1582 deps = _final_deps 1619 deps = _final_deps
1583 } 1620 }
1584 group("${target_name}_incremental") { 1621 group("${target_name}_incremental") {
1585 deps = _incremental_final_deps 1622 deps = _incremental_final_deps
1586 if (defined(invoker.data_deps)) { 1623 if (defined(invoker.data_deps)) {
1587 data_deps = invoker.data_deps 1624 data_deps = invoker.data_deps
1588 } 1625 }
1589 } 1626 }
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 2005
1969 # TODO(GYP): implement this. 2006 # TODO(GYP): implement this.
1970 template("uiautomator_test") { 2007 template("uiautomator_test") {
1971 set_sources_assignment_filter([]) 2008 set_sources_assignment_filter([])
1972 forward_variables_from(invoker, [ "testonly" ]) 2009 forward_variables_from(invoker, [ "testonly" ])
1973 assert(target_name != "") 2010 assert(target_name != "")
1974 assert(invoker.deps != [] || true) 2011 assert(invoker.deps != [] || true)
1975 group(target_name) { 2012 group(target_name) {
1976 } 2013 }
1977 } 2014 }
OLDNEW
« 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