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 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
| 8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
| 9 | 9 |
| 10 assert(is_android) | 10 assert(is_android) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 rebase_path(_result_path, root_build_dir), | 73 rebase_path(_result_path, root_build_dir), |
| 74 "--enable", | 74 "--enable", |
| 75 ] | 75 ] |
| 76 | 76 |
| 77 if (defined(invoker.create_cache) && invoker.create_cache) { | 77 if (defined(invoker.create_cache) && invoker.create_cache) { |
| 78 args += [ | 78 args += [ |
| 79 "--create-cache", | 79 "--create-cache", |
| 80 "--silent", | 80 "--silent", |
| 81 ] | 81 ] |
| 82 } else { | 82 } else { |
| 83 inputs += [ invoker.jar_path ] + invoker.java_files | 83 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir) |
|
jbudorick
2016/04/05 13:11:20
nit: move this down by _rebased_java_files
agrieve
2016/04/05 13:40:02
Done.
| |
| 84 inputs += invoker.java_files | |
| 85 inputs += [ | |
| 86 invoker.jar_path, | |
| 87 invoker.build_config, | |
| 88 ] | |
| 84 deps += [ "//build/android:prepare_android_lint_cache" ] | 89 deps += [ "//build/android:prepare_android_lint_cache" ] |
| 85 _rebased_java_files = rebase_path(invoker.java_files, root_build_dir) | 90 _rebased_java_files = rebase_path(invoker.java_files, root_build_dir) |
| 86 args += [ | 91 args += [ |
| 87 "--jar-path", | 92 "--jar-path", |
| 88 rebase_path(invoker.jar_path, root_build_dir), | 93 rebase_path(invoker.jar_path, root_build_dir), |
| 89 "--java-files=$_rebased_java_files", | 94 "--java-files=$_rebased_java_files", |
| 95 "--classpath=@FileArg($_rebased_build_config:javac:interface_classpath)" , | |
|
jbudorick
2016/04/05 13:11:20
Should there be an equivalent change to //build/an
agrieve
2016/04/05 13:40:02
If we cared about GYP, yes. It doesn't break witho
| |
| 90 ] | 96 ] |
| 91 } | 97 } |
| 92 } | 98 } |
| 93 } | 99 } |
| 94 | 100 |
| 95 template("proguard") { | 101 template("proguard") { |
| 96 action(target_name) { | 102 action(target_name) { |
| 97 set_sources_assignment_filter([]) | 103 set_sources_assignment_filter([]) |
| 98 forward_variables_from(invoker, | 104 forward_variables_from(invoker, |
| 99 [ | 105 [ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 if (proguard_verbose) { | 147 if (proguard_verbose) { |
| 142 args += [ "--verbose" ] | 148 args += [ "--verbose" ] |
| 143 } | 149 } |
| 144 if (defined(invoker.args)) { | 150 if (defined(invoker.args)) { |
| 145 args += invoker.args | 151 args += invoker.args |
| 146 } | 152 } |
| 147 } | 153 } |
| 148 } | 154 } |
| 149 | 155 |
| 150 template("findbugs") { | 156 template("findbugs") { |
| 151 jar_path = invoker.jar_path | |
| 152 | |
| 153 build_config = invoker.build_config | |
| 154 | |
| 155 action(target_name) { | 157 action(target_name) { |
| 156 forward_variables_from(invoker, | 158 forward_variables_from(invoker, |
| 157 [ | 159 [ |
| 158 "deps", | 160 "deps", |
| 159 "testonly", | 161 "testonly", |
| 160 ]) | 162 ]) |
| 161 script = "//build/android/findbugs_diff.py" | 163 script = "//build/android/findbugs_diff.py" |
| 162 depfile = "$target_gen_dir/$target_name.d" | 164 depfile = "$target_gen_dir/$target_name.d" |
| 163 result_path = "$target_gen_dir/$target_name/result.xml" | 165 _result_path = "$target_gen_dir/$target_name/result.xml" |
| 164 exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml" | 166 _exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml" |
| 165 | 167 |
| 166 rebased_build_config = rebase_path(build_config, root_build_dir) | 168 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir) |
| 167 | 169 |
| 168 inputs = [ | 170 inputs = [ |
| 169 "//build/android/pylib/utils/findbugs.py", | 171 "//build/android/pylib/utils/findbugs.py", |
| 170 exclusions_file, | 172 _exclusions_file, |
| 171 jar_path, | 173 invoker.jar_path, |
| 174 invoker.build_config, | |
| 172 ] | 175 ] |
| 173 | 176 |
| 174 outputs = [ | 177 outputs = [ |
| 175 depfile, | 178 depfile, |
| 176 result_path, | 179 _result_path, |
| 177 ] | 180 ] |
| 178 | 181 |
| 179 args = [ | 182 args = [ |
| 180 "--depfile", | 183 "--depfile", |
| 181 rebase_path(depfile, root_build_dir), | 184 rebase_path(depfile, root_build_dir), |
| 182 "--exclude", | 185 "--exclude", |
| 183 rebase_path(exclusions_file, root_build_dir), | 186 rebase_path(_exclusions_file, root_build_dir), |
| 184 "--auxclasspath-gyp", | 187 "--auxclasspath-gyp", |
| 185 "@FileArg($rebased_build_config:javac:classpath)", | 188 "@FileArg($_rebased_build_config:javac:classpath)", |
| 186 "--output-file", | 189 "--output-file", |
| 187 rebase_path(result_path, root_build_dir), | 190 rebase_path(_result_path, root_build_dir), |
| 188 rebase_path(jar_path, root_build_dir), | 191 rebase_path(invoker.jar_path, root_build_dir), |
| 189 ] | 192 ] |
| 190 | 193 |
| 191 if (findbugs_verbose) { | 194 if (findbugs_verbose) { |
| 192 args += [ "-vv" ] | 195 args += [ "-vv" ] |
| 193 } | 196 } |
| 194 } | 197 } |
| 195 } | 198 } |
| 196 | 199 |
| 197 # Generates a script in the output bin.java directory to run a java binary. | 200 # Generates a script in the output bin.java directory to run a java binary. |
| 198 # | 201 # |
| (...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1724 } | 1727 } |
| 1725 deps = build_config_deps | 1728 deps = build_config_deps |
| 1726 } | 1729 } |
| 1727 } | 1730 } |
| 1728 | 1731 |
| 1729 if (_supports_android) { | 1732 if (_supports_android) { |
| 1730 if (_chromium_code) { | 1733 if (_chromium_code) { |
| 1731 _final_datadeps += [ ":${_template_name}__lint" ] | 1734 _final_datadeps += [ ":${_template_name}__lint" ] |
| 1732 android_lint("${_template_name}__lint") { | 1735 android_lint("${_template_name}__lint") { |
| 1733 android_manifest = _android_manifest | 1736 android_manifest = _android_manifest |
| 1737 build_config = _build_config | |
| 1734 jar_path = _jar_path | 1738 jar_path = _jar_path |
| 1735 java_files = _java_files | 1739 java_files = _java_files |
| 1736 deps = [ | 1740 deps = build_config_deps + [ ":$_compile_java_target" ] |
| 1737 ":$_compile_java_target", | |
| 1738 ] | |
| 1739 if (defined(invoker.deps)) { | 1741 if (defined(invoker.deps)) { |
| 1740 deps += invoker.deps | 1742 deps += invoker.deps |
| 1741 } | 1743 } |
| 1742 } | 1744 } |
| 1743 | 1745 |
| 1744 if (_run_findbugs) { | 1746 if (_run_findbugs) { |
| 1745 _final_datadeps += [ ":${_template_name}__findbugs" ] | 1747 _final_datadeps += [ ":${_template_name}__findbugs" ] |
| 1746 findbugs("${_template_name}__findbugs") { | 1748 findbugs("${_template_name}__findbugs") { |
| 1747 build_config = _build_config | 1749 build_config = _build_config |
| 1748 jar_path = _jar_path | 1750 jar_path = _jar_path |
| 1749 deps = [ | 1751 deps = build_config_deps + [ ":$_compile_java_target" ] |
| 1750 ":$_compile_java_target", | |
| 1751 ] | |
| 1752 } | 1752 } |
| 1753 } | 1753 } |
| 1754 } | 1754 } |
| 1755 | 1755 |
| 1756 _final_deps += [ ":${_template_name}__dex" ] | 1756 _final_deps += [ ":${_template_name}__dex" ] |
| 1757 dex("${_template_name}__dex") { | 1757 dex("${_template_name}__dex") { |
| 1758 sources = [ | 1758 sources = [ |
| 1759 _jar_path, | 1759 _jar_path, |
| 1760 ] | 1760 ] |
| 1761 output = _dex_path | 1761 output = _dex_path |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2174 ] | 2174 ] |
| 2175 args = [ | 2175 args = [ |
| 2176 "--depfile", | 2176 "--depfile", |
| 2177 rebase_path(depfile, root_build_dir), | 2177 rebase_path(depfile, root_build_dir), |
| 2178 "--script-output-path", | 2178 "--script-output-path", |
| 2179 rebase_path(generated_script, root_build_dir), | 2179 rebase_path(generated_script, root_build_dir), |
| 2180 ] | 2180 ] |
| 2181 args += test_runner_args | 2181 args += test_runner_args |
| 2182 } | 2182 } |
| 2183 } | 2183 } |
| OLD | NEW |