Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: build/config/android/internal_rules.gni

Issue 1108173002: Roll //build, //native_client, and a few more targets of opportunity. Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Test fix Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/android/config.gni ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ab773eae500ebbc3bf9d1a0968e0e0220837b841 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -62,6 +62,44 @@ template("android_lint") {
}
}
+template("findbugs") {
+ jar_path = invoker.jar_path
+
+ build_config = invoker.build_config
+
+ action(target_name) {
+ script = "//build/android/findbugs_diff.py"
+ depfile = "$target_gen_dir/$target_name.d"
+ result_path = "$target_gen_dir/$target_name/result.xml"
+ exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml"
+
+ rebased_build_config = rebase_path(build_config, root_build_dir)
+
+ inputs = [
+ "//build/android/pylib/utils/findbugs.py",
+ exclusions_file,
+ jar_path,
+ ]
+
+ outputs = [
+ depfile,
+ result_path,
+ ]
+
+ args = [
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
+ "--exclude",
+ rebase_path(exclusions_file, root_build_dir),
+ "--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)) {
@@ -188,7 +226,8 @@ template("write_build_config") {
dep_name = get_label_info(d, "name")
possible_deps_configs += [ "$dep_gen_dir/$dep_name.build_config" ]
}
- rebase_possible_deps_configs = rebase_path(possible_deps_configs)
+ rebase_possible_deps_configs =
+ rebase_path(possible_deps_configs, root_build_dir)
outputs = [
depfile,
@@ -250,6 +289,19 @@ template("write_build_config") {
args += [ "--bypass-platform-checks" ]
}
+ if (defined(invoker.apk_under_test)) {
+ deps += [ invoker.apk_under_test ]
+ apk_under_test_gen_dir =
+ get_label_info(invoker.apk_under_test, "target_gen_dir")
+ apk_under_test_name = get_label_info(invoker.apk_under_test, "name")
+ apk_under_test_config =
+ "$apk_under_test_gen_dir/$apk_under_test_name.build_config"
+ args += [
+ "--tested-apk-config",
+ rebase_path(apk_under_test_config, root_build_dir),
+ ]
+ }
+
if (is_android_resources || is_apk) {
assert(defined(invoker.resources_zip))
args += [
@@ -262,6 +314,8 @@ template("write_build_config") {
"--android-manifest",
rebase_path(invoker.android_manifest, root_build_dir),
]
+ } else {
+ assert(!is_apk, "apk build configs require an android_manifest")
}
if (defined(invoker.custom_package)) {
args += [
@@ -914,6 +968,14 @@ template("java_library_impl") {
jar_path = _jar_path
java_files = _java_files
}
+
+ if (run_findbugs) {
+ _final_datadeps += [ ":${_template_name}__findbugs" ]
+ findbugs("${_template_name}__findbugs") {
+ build_config = _build_config
+ jar_path = _jar_path
+ }
+ }
}
_final_deps += [ ":${_template_name}__dex" ]
« no previous file with comments | « build/config/android/config.gni ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698