Chromium Code Reviews| Index: build/config/android/internal_rules.gni |
| diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
| index 8920e95abccd1509fa67b70ac27c73ea6c83c701..bd912bfca6809fc3af2678f9359e2637816eea7d 100644 |
| --- a/build/config/android/internal_rules.gni |
| +++ b/build/config/android/internal_rules.gni |
| @@ -62,6 +62,38 @@ template("android_lint") { |
| } |
| } |
| +template("findbugs") { |
| + jar_path = invoker.jar_path |
| + |
| + build_config = invoker.build_config |
| + |
| + action(target_name) { |
| + script = "//build/android/findbugs_diff.py" |
| + result_path = "$target_gen_dir/$target_name/result.xml" |
| + exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml" |
|
cjhopman
2015/03/12 19:22:43
This action should have a depfile. This will allow
|
| + |
| + rebased_build_config = rebase_path(build_config, root_build_dir) |
| + |
| + inputs = [ |
| + "//build/android/pylib/utils/findbugs.py", |
| + exclusions_file, |
| + jar_path, |
| + ] |
| + |
| + outputs = [ |
| + result_path, |
| + ] |
| + |
| + args = [ |
| + "--auxclasspath-gyp", |
| + "@FileArg($rebased_build_config:javac:classpath)", |
| + "--output-file", |
| + rebase_path(result_path, root_build_dir), |
| + rebase_path(jar_path, root_build_dir), |
| + ] |
| + } |
| +} |
| + |
| template("dex") { |
| set_sources_assignment_filter([]) |
| if (defined(invoker.testonly)) { |
| @@ -914,6 +946,12 @@ template("java_library_impl") { |
| jar_path = _jar_path |
| java_files = _java_files |
| } |
| + |
| + _final_datadeps += [ ":${_template_name}__findbugs" ] |
|
cjhopman
2015/03/12 19:22:43
Let's not add this to _final_datadeps for now. The
jbudorick
2015/03/13 13:12:19
sgtm
|
| + findbugs("${_template_name}__findbugs") { |
| + build_config = _build_config |
| + jar_path = _jar_path |
| + } |
| } |
| _final_deps += [ ":${_template_name}__dex" ] |