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 | 6 |
7 assert(is_android) | 7 assert(is_android) |
8 | 8 |
9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) | 9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) |
10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir) | 10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir) |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 | 658 |
659 _jar_excluded_patterns = [] | 659 _jar_excluded_patterns = [] |
660 if (defined(invoker.jar_excluded_patterns)) { | 660 if (defined(invoker.jar_excluded_patterns)) { |
661 _jar_excluded_patterns += invoker.jar_excluded_patterns | 661 _jar_excluded_patterns += invoker.jar_excluded_patterns |
662 } | 662 } |
663 | 663 |
664 _chromium_code = false | 664 _chromium_code = false |
665 if (defined(invoker.chromium_code)) { | 665 if (defined(invoker.chromium_code)) { |
666 _chromium_code = invoker.chromium_code | 666 _chromium_code = invoker.chromium_code |
667 } | 667 } |
| 668 _manifest_entries = [] |
| 669 if (defined(invoker.manifest_entries)) { |
| 670 _manifest_entries = invoker.manifest_entries |
| 671 } |
668 | 672 |
669 _srcjar_deps = [] | 673 _srcjar_deps = [] |
670 if (defined(invoker.srcjar_deps)) { | 674 if (defined(invoker.srcjar_deps)) { |
671 _srcjar_deps += invoker.srcjar_deps | 675 _srcjar_deps += invoker.srcjar_deps |
672 } | 676 } |
673 | 677 |
674 _java_srcjars = [] | 678 _java_srcjars = [] |
675 if (defined(invoker.srcjars)) { | 679 if (defined(invoker.srcjars)) { |
676 _java_srcjars = invoker.srcjars | 680 _java_srcjars = invoker.srcjars |
677 } | 681 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 _rebased_depfile = rebase_path(depfile, root_build_dir) | 715 _rebased_depfile = rebase_path(depfile, root_build_dir) |
712 args = [ | 716 args = [ |
713 "--depfile=$_rebased_depfile", | 717 "--depfile=$_rebased_depfile", |
714 "--classpath=$_rebased_system_jars", | 718 "--classpath=$_rebased_system_jars", |
715 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", | 719 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", |
716 "--jar-path=$_rebased_jar_path", | 720 "--jar-path=$_rebased_jar_path", |
717 "--java-srcjars=$_rebased_java_srcjars", | 721 "--java-srcjars=$_rebased_java_srcjars", |
718 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", | 722 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", |
719 "--jar-excluded-classes=$_jar_excluded_patterns", | 723 "--jar-excluded-classes=$_jar_excluded_patterns", |
720 ] | 724 ] |
| 725 foreach(e, _manifest_entries) { |
| 726 args += [ "--manifest-entry=" + e ] |
| 727 } |
721 if (_chromium_code) { | 728 if (_chromium_code) { |
722 args += [ "--chromium-code=1" ] | 729 args += [ "--chromium-code=1" ] |
723 } | 730 } |
724 | 731 |
725 args += rebase_path(_java_files, root_build_dir) | 732 args += rebase_path(_java_files, root_build_dir) |
726 } | 733 } |
727 | 734 |
728 _final_deps += [ ":${_template_name}__finish" ] | 735 _final_deps += [ ":${_template_name}__finish" ] |
729 process_java_prebuilt("${_template_name}__finish") { | 736 process_java_prebuilt("${_template_name}__finish") { |
730 build_config = _build_config | 737 build_config = _build_config |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 } | 861 } |
855 if (defined(invoker.proguard_preprocess)) { | 862 if (defined(invoker.proguard_preprocess)) { |
856 proguard_preprocess = invoker.proguard_preprocess | 863 proguard_preprocess = invoker.proguard_preprocess |
857 } | 864 } |
858 if (defined(invoker.proguard_config)) { | 865 if (defined(invoker.proguard_config)) { |
859 proguard_config = invoker.proguard_config | 866 proguard_config = invoker.proguard_config |
860 } | 867 } |
861 if (defined(invoker.dist_jar_path)) { | 868 if (defined(invoker.dist_jar_path)) { |
862 dist_jar_path = invoker.dist_jar_path | 869 dist_jar_path = invoker.dist_jar_path |
863 } | 870 } |
| 871 if (defined(invoker.manifest_entries)) { |
| 872 manifest_entries = invoker.manifest_entries |
| 873 } |
864 } | 874 } |
865 | 875 |
866 if (defined(invoker.main_class)) { | 876 if (defined(invoker.main_class)) { |
867 _final_deps += [ ":${_template_name}__binary_script" ] | 877 _final_deps += [ ":${_template_name}__binary_script" ] |
868 action("${_template_name}__binary_script") { | 878 action("${_template_name}__binary_script") { |
869 script = "//build/android/gyp/create_java_binary_script.py" | 879 script = "//build/android/gyp/create_java_binary_script.py" |
870 depfile = "$target_gen_dir/$target_name.d" | 880 depfile = "$target_gen_dir/$target_name.d" |
871 java_script = "$root_build_dir/bin/$_template_name" | 881 java_script = "$root_build_dir/bin/$_template_name" |
872 inputs = [ | 882 inputs = [ |
873 _build_config, | 883 _build_config, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 rebased_build_config = rebase_path(build_config, root_build_dir) | 1088 rebased_build_config = rebase_path(build_config, root_build_dir) |
1079 dex(target_name) { | 1089 dex(target_name) { |
1080 inputs = [ | 1090 inputs = [ |
1081 build_config, | 1091 build_config, |
1082 ] | 1092 ] |
1083 output = invoker.dex_path | 1093 output = invoker.dex_path |
1084 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" | 1094 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" |
1085 args = [ "--inputs=@FileArg($dex_arg_key)" ] | 1095 args = [ "--inputs=@FileArg($dex_arg_key)" ] |
1086 } | 1096 } |
1087 } | 1097 } |
OLD | NEW |