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

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

Issue 1690983002: Reland of Make instrumentation_test_apk depend on their apk_under_test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dist-jar
Patch Set: fix proguard failure Created 4 years, 10 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
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/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 import("//build/toolchain/toolchain.gni") 9 import("//build/toolchain/toolchain.gni")
10 import("//third_party/android_platform/config.gni") 10 import("//third_party/android_platform/config.gni")
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 java_files = [] 1528 java_files = []
1529 } 1529 }
1530 srcjar_deps = _srcjar_deps 1530 srcjar_deps = _srcjar_deps
1531 jar_path = _jar_path 1531 jar_path = _jar_path
1532 dex_path = _lib_dex_path 1532 dex_path = _lib_dex_path
1533 emma_never_instrument = _emma_never_instrument 1533 emma_never_instrument = _emma_never_instrument
1534 1534
1535 if (defined(invoker.deps)) { 1535 if (defined(invoker.deps)) {
1536 deps += invoker.deps 1536 deps += invoker.deps
1537 } 1537 }
1538 if (defined(invoker.apk_under_test)) {
1539 deps += [ "${invoker.apk_under_test}__java" ]
1540 }
1538 } 1541 }
1539 1542
1540 # TODO(cjhopman): This is only ever needed to calculate the list of tests to 1543 # TODO(cjhopman): This is only ever needed to calculate the list of tests to
1541 # run. See build/android/pylib/instrumentation/test_jar.py. We should be 1544 # run. See build/android/pylib/instrumentation/test_jar.py. We should be
1542 # able to just do that calculation at build time instead. 1545 # able to just do that calculation at build time instead.
1543 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) { 1546 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) {
1544 _dist_ijar_path = "$root_build_dir/test.lib.java/" + 1547 _dist_ijar_path = "$root_build_dir/test.lib.java/" +
1545 get_path_info(_final_apk_path, "name") + ".jar" 1548 get_path_info(_final_apk_path, "name") + ".jar"
1546 action("${_template_name}_dist_ijar") { 1549 action("${_template_name}_dist_ijar") {
1547 script = "//build/android/gyp/create_dist_jar.py" 1550 script = "//build/android/gyp/create_dist_jar.py"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 ":$build_config_target", 1586 ":$build_config_target",
1584 ":$java_target", 1587 ":$java_target",
1585 ":$process_resources_target", 1588 ":$process_resources_target",
1586 ] 1589 ]
1587 inputs = [ 1590 inputs = [
1588 _build_config, 1591 _build_config,
1589 _jar_path, 1592 _jar_path,
1590 ] + _proguard_configs 1593 ] + _proguard_configs
1591 1594
1592 output_jar_path = _proguard_jar_path 1595 output_jar_path = _proguard_jar_path
1593 rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) 1596 _rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir)
1594 args = [ 1597 args = [
1595 "--proguard-configs=$rebased_proguard_configs", 1598 "--proguard-configs=$_rebased_proguard_configs",
1596 "--tested-apk-info=@FileArg($_rebased_build_config:proguard:tested_apk_i nfo)",
1597 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", 1599 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)",
1598 ] 1600 ]
1601 if (defined(invoker.apk_under_test)) {
1602 deps += [
1603 "${invoker.apk_under_test}__build_config",
1604 "${invoker.apk_under_test}__proguard",
1605 ]
1606 _apk_under_test_build_config =
1607 get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" +
1608 get_label_info(invoker.apk_under_test, "name") + ".build_config"
1609 _rebased_apk_under_test_build_config =
1610 rebase_path(_apk_under_test_build_config, root_build_dir)
1611 args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_con fig:deps_info:proguard_info)" ]
1612 }
1599 } 1613 }
1600 _dex_sources = [ _proguard_jar_path ] 1614 _dex_sources = [ _proguard_jar_path ]
1601 _dex_deps = [ ":$_proguard_target" ] 1615 _dex_deps = [ ":$_proguard_target" ]
1602 } else { 1616 } else {
1603 if (enable_multidex) { 1617 if (enable_multidex) {
1604 _dex_sources = [ _jar_path ] 1618 _dex_sources = [ _jar_path ]
1605 } else { 1619 } else {
1606 _dex_sources = [ _lib_dex_path ] 1620 _dex_sources = [ _lib_dex_path ]
1607 } 1621 }
1608 _dex_deps = [ ":$java_target" ] 1622 _dex_deps = [ ":$java_target" ]
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 (defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir)) 2003 (defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir))
1990 } 2004 }
1991 2005
1992 group(target_name) { 2006 group(target_name) {
1993 public_deps = [ 2007 public_deps = [
1994 ":$_apk_target_name", 2008 ":$_apk_target_name",
1995 ":$_test_runner_target_name", 2009 ":$_test_runner_target_name",
1996 2010
1997 # Required by test runner to enumerate test list. 2011 # Required by test runner to enumerate test list.
1998 ":${_apk_target_name}_dist_ijar", 2012 ":${_apk_target_name}_dist_ijar",
2013 invoker.apk_under_test,
1999 ] 2014 ]
2000 } 2015 }
2001 group("${target_name}_incremental") { 2016 group("${target_name}_incremental") {
2002 public_deps = [ 2017 public_deps = [
2003 ":${_apk_target_name}_dist_ijar", 2018 ":${_apk_target_name}_dist_ijar",
2004 ":${_apk_target_name}_incremental", 2019 ":${_apk_target_name}_incremental",
2005 ":${_test_runner_target_name}_incremental", 2020 ":${_test_runner_target_name}_incremental",
2006 "${invoker.apk_under_test}_incremental", 2021 "${invoker.apk_under_test}_incremental",
2007 ] 2022 ]
2008 } 2023 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 } 2331 }
2317 2332
2318 android_library(target_name) { 2333 android_library(target_name) {
2319 java_files = [] 2334 java_files = []
2320 srcjar_deps = [ ":${_template_name}__protoc_java" ] 2335 srcjar_deps = [ ":${_template_name}__protoc_java" ]
2321 deps = [ 2336 deps = [
2322 "//third_party/android_protobuf:protobuf_nano_javalib", 2337 "//third_party/android_protobuf:protobuf_nano_javalib",
2323 ] 2338 ]
2324 } 2339 }
2325 } 2340 }
OLDNEW
« build/android/gyp/write_build_config.py ('K') | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698