| 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 | 9 |
| 10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) | 10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 args += [ | 206 args += [ |
| 207 "--dex-path", rebase_path(invoker.dex_path, root_build_dir), | 207 "--dex-path", rebase_path(invoker.dex_path, root_build_dir), |
| 208 ] | 208 ] |
| 209 } | 209 } |
| 210 if (supports_android) { | 210 if (supports_android) { |
| 211 args += [ "--supports-android" ] | 211 args += [ "--supports-android" ] |
| 212 } | 212 } |
| 213 if (requires_android) { | 213 if (requires_android) { |
| 214 args += [ "--requires-android" ] | 214 args += [ "--requires-android" ] |
| 215 } | 215 } |
| 216 if (defined(invoker.bypass_platform_checks) && |
| 217 invoker.bypass_platform_checks) { |
| 218 args += [ "--bypass-platform-checks" ] |
| 219 } |
| 216 | 220 |
| 217 if (is_android_resources || is_apk) { | 221 if (is_android_resources || is_apk) { |
| 218 assert(defined(invoker.resources_zip)) | 222 assert(defined(invoker.resources_zip)) |
| 219 args += [ | 223 args += [ |
| 220 "--resources-zip", rebase_path(invoker.resources_zip, root_build_dir), | 224 "--resources-zip", rebase_path(invoker.resources_zip, root_build_dir), |
| 221 ] | 225 ] |
| 222 if (defined(invoker.android_manifest)) { | 226 if (defined(invoker.android_manifest)) { |
| 223 inputs += [ | 227 inputs += [ |
| 224 invoker.android_manifest | 228 invoker.android_manifest |
| 225 ] | 229 ] |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", | 631 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", |
| 628 "--jar-path=$_rebased_jar_path", | 632 "--jar-path=$_rebased_jar_path", |
| 629 "--java-srcjars=$_rebased_java_srcjars", | 633 "--java-srcjars=$_rebased_java_srcjars", |
| 630 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", | 634 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", |
| 631 "--jar-excluded-classes=$_jar_excluded_patterns", | 635 "--jar-excluded-classes=$_jar_excluded_patterns", |
| 632 ] | 636 ] |
| 633 if (_chromium_code) { | 637 if (_chromium_code) { |
| 634 args += [ "--chromium-code=1" ] | 638 args += [ "--chromium-code=1" ] |
| 635 } | 639 } |
| 636 | 640 |
| 637 if (defined(invoker.main_class)) { | |
| 638 args += [ | |
| 639 "--main-class", invoker.main_class | |
| 640 ] | |
| 641 } | |
| 642 | |
| 643 args += rebase_path(_java_files, root_build_dir) | 641 args += rebase_path(_java_files, root_build_dir) |
| 644 } | 642 } |
| 645 | 643 |
| 646 _final_deps += [ ":${_template_name}__finish" ] | 644 _final_deps += [ ":${_template_name}__finish" ] |
| 647 process_java_prebuilt("${_template_name}__finish") { | 645 process_java_prebuilt("${_template_name}__finish") { |
| 648 build_config = _build_config | 646 build_config = _build_config |
| 649 input_jar_path = _intermediate_jar_path | 647 input_jar_path = _intermediate_jar_path |
| 650 output_jar_path = _final_jar_path | 648 output_jar_path = _final_jar_path |
| 651 if (defined(invoker.proguard_preprocess) && invoker.proguard_preprocess) { | 649 if (defined(invoker.proguard_preprocess) && invoker.proguard_preprocess) { |
| 652 proguard_preprocess = invoker.proguard_preprocess | 650 proguard_preprocess = invoker.proguard_preprocess |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 690 |
| 693 if (defined(invoker.override_build_config)) { | 691 if (defined(invoker.override_build_config)) { |
| 694 _build_config = invoker.override_build_config | 692 _build_config = invoker.override_build_config |
| 695 } else { | 693 } else { |
| 696 _build_config = _base_path + ".build_config" | 694 _build_config = _base_path + ".build_config" |
| 697 _final_deps += [ ":${_template_name}__build_config" ] | 695 _final_deps += [ ":${_template_name}__build_config" ] |
| 698 write_build_config("${_template_name}__build_config") { | 696 write_build_config("${_template_name}__build_config") { |
| 699 type = "java_library" | 697 type = "java_library" |
| 700 supports_android = _supports_android | 698 supports_android = _supports_android |
| 701 requires_android = _requires_android | 699 requires_android = _requires_android |
| 700 bypass_platform_checks = (defined(invoker.bypass_platform_checks) && |
| 701 invoker.bypass_platform_checks) |
| 702 | 702 |
| 703 deps = [] | 703 deps = [] |
| 704 if (defined(invoker.deps)) { | 704 if (defined(invoker.deps)) { |
| 705 deps += invoker.deps | 705 deps += invoker.deps |
| 706 } | 706 } |
| 707 | 707 |
| 708 build_config = _build_config | 708 build_config = _build_config |
| 709 jar_path = _jar_path | 709 jar_path = _jar_path |
| 710 if (_supports_android) { | 710 if (_supports_android) { |
| 711 dex_path = _dex_path | 711 dex_path = _dex_path |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 compile_java("${_template_name}__compile_java") { | 757 compile_java("${_template_name}__compile_java") { |
| 758 jar_path = _jar_path | 758 jar_path = _jar_path |
| 759 build_config = _build_config | 759 build_config = _build_config |
| 760 java_files = _java_files | 760 java_files = _java_files |
| 761 srcjar_deps = _srcjar_deps | 761 srcjar_deps = _srcjar_deps |
| 762 srcjars = _srcjars | 762 srcjars = _srcjars |
| 763 chromium_code = _chromium_code | 763 chromium_code = _chromium_code |
| 764 android = _requires_android | 764 android = _requires_android |
| 765 | 765 |
| 766 if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoke
r.jar_excluded_patterns } | 766 if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoke
r.jar_excluded_patterns } |
| 767 if (defined(invoker.main_class)) { main_class = invoker.main_class } | |
| 768 if (defined(invoker.proguard_preprocess)) { proguard_preprocess = invoker.pr
oguard_preprocess } | 767 if (defined(invoker.proguard_preprocess)) { proguard_preprocess = invoker.pr
oguard_preprocess } |
| 769 if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_c
onfig } | 768 if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_c
onfig } |
| 770 if (defined(invoker.dist_jar_path)) { dist_jar_path = invoker.dist_jar_path
} | 769 if (defined(invoker.dist_jar_path)) { dist_jar_path = invoker.dist_jar_path
} |
| 771 } | 770 } |
| 772 | 771 |
| 773 if (defined(invoker.main_class)) { | 772 if (defined(invoker.main_class)) { |
| 774 _final_deps += [ ":${_template_name}__binary_script" ] | 773 _final_deps += [ ":${_template_name}__binary_script" ] |
| 775 action("${_template_name}__binary_script") { | 774 action("${_template_name}__binary_script") { |
| 776 script = "//build/android/gyp/create_java_binary_script.py" | 775 script = "//build/android/gyp/create_java_binary_script.py" |
| 777 depfile = "$target_gen_dir/$target_name.d" | 776 depfile = "$target_gen_dir/$target_name.d" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 | 938 |
| 940 if (defined(invoker.clear_dir) && invoker.clear_dir) { | 939 if (defined(invoker.clear_dir) && invoker.clear_dir) { |
| 941 args += ["--clear"] | 940 args += ["--clear"] |
| 942 } | 941 } |
| 943 | 942 |
| 944 if (defined(invoker.args)) { | 943 if (defined(invoker.args)) { |
| 945 args += invoker.args | 944 args += invoker.args |
| 946 } | 945 } |
| 947 } | 946 } |
| 948 } | 947 } |
| OLD | NEW |