| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 "--processed-config-path", | 55 "--processed-config-path", |
| 56 rebase_path(config_path, root_build_dir), | 56 rebase_path(config_path, root_build_dir), |
| 57 "--result-path", | 57 "--result-path", |
| 58 rebase_path(result_path, root_build_dir), | 58 rebase_path(result_path, root_build_dir), |
| 59 "--java-files=$rebased_java_files", | 59 "--java-files=$rebased_java_files", |
| 60 "--enable", | 60 "--enable", |
| 61 ] | 61 ] |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 template("findbugs") { |
| 66 jar_path = invoker.jar_path |
| 67 |
| 68 build_config = invoker.build_config |
| 69 |
| 70 action(target_name) { |
| 71 script = "//build/android/findbugs_diff.py" |
| 72 depfile = "$target_gen_dir/$target_name.d" |
| 73 result_path = "$target_gen_dir/$target_name/result.xml" |
| 74 exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml" |
| 75 |
| 76 rebased_build_config = rebase_path(build_config, root_build_dir) |
| 77 |
| 78 inputs = [ |
| 79 "//build/android/pylib/utils/findbugs.py", |
| 80 exclusions_file, |
| 81 jar_path, |
| 82 ] |
| 83 |
| 84 outputs = [ |
| 85 depfile, |
| 86 result_path, |
| 87 ] |
| 88 |
| 89 args = [ |
| 90 "--depfile", |
| 91 rebase_path(depfile, root_build_dir), |
| 92 "--exclude", |
| 93 rebase_path(exclusions_file, root_build_dir), |
| 94 "--auxclasspath-gyp", |
| 95 "@FileArg($rebased_build_config:javac:classpath)", |
| 96 "--output-file", |
| 97 rebase_path(result_path, root_build_dir), |
| 98 rebase_path(jar_path, root_build_dir), |
| 99 ] |
| 100 } |
| 101 } |
| 102 |
| 65 template("dex") { | 103 template("dex") { |
| 66 set_sources_assignment_filter([]) | 104 set_sources_assignment_filter([]) |
| 67 if (defined(invoker.testonly)) { | 105 if (defined(invoker.testonly)) { |
| 68 testonly = invoker.testonly | 106 testonly = invoker.testonly |
| 69 } | 107 } |
| 70 | 108 |
| 71 assert(defined(invoker.output)) | 109 assert(defined(invoker.output)) |
| 72 action(target_name) { | 110 action(target_name) { |
| 73 script = "//build/android/gyp/dex.py" | 111 script = "//build/android/gyp/dex.py" |
| 74 depfile = "$target_gen_dir/$target_name.d" | 112 depfile = "$target_gen_dir/$target_name.d" |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 if (defined(invoker.android_manifest)) { | 945 if (defined(invoker.android_manifest)) { |
| 908 _android_manifest = invoker.android_manifest | 946 _android_manifest = invoker.android_manifest |
| 909 } | 947 } |
| 910 | 948 |
| 911 _final_datadeps += [ ":${_template_name}__lint" ] | 949 _final_datadeps += [ ":${_template_name}__lint" ] |
| 912 android_lint("${_template_name}__lint") { | 950 android_lint("${_template_name}__lint") { |
| 913 android_manifest = _android_manifest | 951 android_manifest = _android_manifest |
| 914 jar_path = _jar_path | 952 jar_path = _jar_path |
| 915 java_files = _java_files | 953 java_files = _java_files |
| 916 } | 954 } |
| 955 |
| 956 if (run_findbugs) { |
| 957 _final_datadeps += [ ":${_template_name}__findbugs" ] |
| 958 findbugs("${_template_name}__findbugs") { |
| 959 build_config = _build_config |
| 960 jar_path = _jar_path |
| 961 } |
| 962 } |
| 917 } | 963 } |
| 918 | 964 |
| 919 _final_deps += [ ":${_template_name}__dex" ] | 965 _final_deps += [ ":${_template_name}__dex" ] |
| 920 dex("${_template_name}__dex") { | 966 dex("${_template_name}__dex") { |
| 921 sources = [ | 967 sources = [ |
| 922 _jar_path, | 968 _jar_path, |
| 923 ] | 969 ] |
| 924 output = _dex_path | 970 output = _dex_path |
| 925 } | 971 } |
| 926 } | 972 } |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 ] | 1138 ] |
| 1093 output = invoker.dex_path | 1139 output = invoker.dex_path |
| 1094 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" | 1140 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" |
| 1095 args = [ "--inputs=@FileArg($dex_arg_key)" ] | 1141 args = [ "--inputs=@FileArg($dex_arg_key)" ] |
| 1096 if (defined(invoker.excluded_jars)) { | 1142 if (defined(invoker.excluded_jars)) { |
| 1097 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) | 1143 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) |
| 1098 args += [ "--excluded-paths=${excluded_jars}" ] | 1144 args += [ "--excluded-paths=${excluded_jars}" ] |
| 1099 } | 1145 } |
| 1100 } | 1146 } |
| 1101 } | 1147 } |
| OLD | NEW |