Chromium Code Reviews| OLD | NEW |
|---|---|
| 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("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 | 7 |
| 8 assert(is_android) | 8 assert(is_android) |
| 9 | 9 |
| 10 # Write the target's .build_config file. This is a json file that contains a | 10 # Write the target's .build_config file. This is a json file that contains a |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 538 "public_deps", | 538 "public_deps", |
| 539 "testonly", | 539 "testonly", |
| 540 ]) | 540 ]) |
| 541 script = "//build/android/gyp/proguard.py" | 541 script = "//build/android/gyp/proguard.py" |
| 542 if (defined(invoker.proguard_jar_path)) { | 542 if (defined(invoker.proguard_jar_path)) { |
| 543 _proguard_jar_path = invoker.proguard_jar_path | 543 _proguard_jar_path = invoker.proguard_jar_path |
| 544 } else { | 544 } else { |
| 545 _proguard_jar_path = "//third_party/proguard/lib/proguard.jar" | 545 _proguard_jar_path = "//third_party/proguard/lib/proguard.jar" |
| 546 } | 546 } |
| 547 _output_jar_path = invoker.output_jar_path | 547 _output_jar_path = invoker.output_jar_path |
| 548 _input_jars_paths = [] | |
| 549 if (defined(invoker.input_jars_paths)) { | |
| 550 _input_jars_paths += invoker.input_jars_paths | |
| 551 } | |
| 548 inputs = [ | 552 inputs = [ |
| 549 _proguard_jar_path, | 553 _proguard_jar_path, |
| 550 ] | 554 ] |
| 551 if (defined(invoker.alternative_android_sdk_jar)) { | 555 if (defined(invoker.alternative_android_sdk_jar)) { |
| 552 inputs += [ invoker.alternative_android_sdk_jar ] | 556 inputs += [ invoker.alternative_android_sdk_jar ] |
| 553 _rebased_android_sdk_jar = | 557 _rebased_android_sdk_jar = |
| 554 rebase_path(invoker.alternative_android_sdk_jar) | 558 rebase_path(invoker.alternative_android_sdk_jar) |
| 555 } else { | 559 } else { |
| 556 inputs += [ android_sdk_jar ] | 560 inputs += [ android_sdk_jar ] |
| 557 _rebased_android_sdk_jar = rebased_android_sdk_jar | 561 _rebased_android_sdk_jar = rebased_android_sdk_jar |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 571 args = [ | 575 args = [ |
| 572 "--depfile", | 576 "--depfile", |
| 573 rebase_path(depfile, root_build_dir), | 577 rebase_path(depfile, root_build_dir), |
| 574 "--proguard-path", | 578 "--proguard-path", |
| 575 rebase_path(_proguard_jar_path, root_build_dir), | 579 rebase_path(_proguard_jar_path, root_build_dir), |
| 576 "--output-path", | 580 "--output-path", |
| 577 rebase_path(_output_jar_path, root_build_dir), | 581 rebase_path(_output_jar_path, root_build_dir), |
| 578 "--classpath", | 582 "--classpath", |
| 579 _rebased_android_sdk_jar, | 583 _rebased_android_sdk_jar, |
| 580 ] | 584 ] |
| 585 foreach(c, _input_jars_paths) { | |
| 586 args += [ "--classpath=" + c ] | |
| 587 } | |
| 581 if (proguard_verbose) { | 588 if (proguard_verbose) { |
| 582 args += [ "--verbose" ] | 589 args += [ "--verbose" ] |
| 583 } | 590 } |
| 584 if (defined(invoker.args)) { | 591 if (defined(invoker.args)) { |
| 585 args += invoker.args | 592 args += invoker.args |
| 586 } | 593 } |
| 587 } | 594 } |
| 588 } | 595 } |
| 589 | 596 |
| 590 template("findbugs") { | 597 template("findbugs") { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 794 } | 801 } |
| 795 | 802 |
| 796 if (defined(invoker.sources)) { | 803 if (defined(invoker.sources)) { |
| 797 args += rebase_path(invoker.sources, root_build_dir) | 804 args += rebase_path(invoker.sources, root_build_dir) |
| 798 } | 805 } |
| 799 } | 806 } |
| 800 } | 807 } |
| 801 | 808 |
| 802 template("process_java_prebuilt") { | 809 template("process_java_prebuilt") { |
| 803 set_sources_assignment_filter([]) | 810 set_sources_assignment_filter([]) |
| 804 forward_variables_from(invoker, [ "testonly" ]) | 811 forward_variables_from(invoker, |
| 812 [ | |
| 813 "testonly", | |
| 814 "input_jars_paths", | |
| 815 ]) | |
| 816 assert(!defined(input_jars_paths) || input_jars_paths != [] || true) # Mark as used | |
| 805 | 817 |
| 806 assert(invoker.build_config != "") | 818 assert(invoker.build_config != "") |
| 807 _build_config = invoker.build_config | 819 _build_config = invoker.build_config |
| 808 _rebased_build_config = rebase_path(_build_config, root_build_dir) | 820 _rebased_build_config = rebase_path(_build_config, root_build_dir) |
| 809 assert(_rebased_build_config != "" || true) # Mark used. | 821 assert(_rebased_build_config != "" || true) # Mark used. |
| 810 | 822 |
| 811 _proguard_preprocess = | 823 _proguard_preprocess = |
| 812 defined(invoker.proguard_preprocess) && invoker.proguard_preprocess | 824 defined(invoker.proguard_preprocess) && invoker.proguard_preprocess |
| 813 _input_jar_path = invoker.input_jar_path | 825 _input_jar_path = invoker.input_jar_path |
| 814 _output_jar_path = invoker.output_jar_path | 826 _output_jar_path = invoker.output_jar_path |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1589 if (_supports_android) { | 1601 if (_supports_android) { |
| 1590 dex_path = _dex_path | 1602 dex_path = _dex_path |
| 1591 } | 1603 } |
| 1592 } | 1604 } |
| 1593 | 1605 |
| 1594 process_java_prebuilt(_process_jar_target_name) { | 1606 process_java_prebuilt(_process_jar_target_name) { |
| 1595 forward_variables_from(invoker, | 1607 forward_variables_from(invoker, |
| 1596 [ | 1608 [ |
| 1597 "jar_excluded_patterns", | 1609 "jar_excluded_patterns", |
| 1598 "strip_resource_classes", | 1610 "strip_resource_classes", |
| 1611 "input_jars_paths", | |
| 1599 ]) | 1612 ]) |
| 1613 assert(!defined(input_jars_paths) || input_jars_paths != [] || true) # Ma rk as used | |
|
Maria
2016/06/15 02:50:18
nit: long line
| |
| 1614 | |
| 1600 visibility = [ | 1615 visibility = [ |
| 1601 ":$_ijar_target_name", | 1616 ":$_ijar_target_name", |
| 1602 ":$_template_name", | 1617 ":$_template_name", |
| 1603 ] | 1618 ] |
| 1604 if (_supports_android) { | 1619 if (_supports_android) { |
| 1605 visibility += [ ":$_dex_target_name" ] | 1620 visibility += [ ":$_dex_target_name" ] |
| 1606 } | 1621 } |
| 1607 | 1622 |
| 1608 if (defined(invoker.proguard_preprocess) && invoker.proguard_preprocess) { | 1623 if (defined(invoker.proguard_preprocess) && invoker.proguard_preprocess) { |
| 1609 proguard_preprocess = true | 1624 proguard_preprocess = true |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2372 outputs = [ | 2387 outputs = [ |
| 2373 depfile, | 2388 depfile, |
| 2374 invoker.out_manifest, | 2389 invoker.out_manifest, |
| 2375 ] | 2390 ] |
| 2376 inputs = [ | 2391 inputs = [ |
| 2377 invoker.main_manifest, | 2392 invoker.main_manifest, |
| 2378 ] | 2393 ] |
| 2379 } | 2394 } |
| 2380 } | 2395 } |
| 2381 } | 2396 } |
| OLD | NEW |