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

Side by Side Diff: build/config/android/internal_rules.gni

Issue 1000793002: [Android] Incorporate findbugs into android builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
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
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 result_path = "$target_gen_dir/$target_name/result.xml"
73 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
74
75 rebased_build_config = rebase_path(build_config, root_build_dir)
76
77 inputs = [
78 "//build/android/pylib/utils/findbugs.py",
79 exclusions_file,
80 jar_path,
81 ]
82
83 outputs = [
84 result_path,
85 ]
86
87 args = [
88 "--auxclasspath-gyp",
89 "@FileArg($rebased_build_config:javac:classpath)",
90 "--output-file",
91 rebase_path(result_path, root_build_dir),
92 rebase_path(jar_path, root_build_dir),
93 ]
94 }
95 }
96
65 template("dex") { 97 template("dex") {
66 set_sources_assignment_filter([]) 98 set_sources_assignment_filter([])
67 if (defined(invoker.testonly)) { 99 if (defined(invoker.testonly)) {
68 testonly = invoker.testonly 100 testonly = invoker.testonly
69 } 101 }
70 102
71 assert(defined(invoker.output)) 103 assert(defined(invoker.output))
72 action(target_name) { 104 action(target_name) {
73 script = "//build/android/gyp/dex.py" 105 script = "//build/android/gyp/dex.py"
74 depfile = "$target_gen_dir/$target_name.d" 106 depfile = "$target_gen_dir/$target_name.d"
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (defined(invoker.android_manifest)) { 939 if (defined(invoker.android_manifest)) {
908 _android_manifest = invoker.android_manifest 940 _android_manifest = invoker.android_manifest
909 } 941 }
910 942
911 _final_datadeps += [ ":${_template_name}__lint" ] 943 _final_datadeps += [ ":${_template_name}__lint" ]
912 android_lint("${_template_name}__lint") { 944 android_lint("${_template_name}__lint") {
913 android_manifest = _android_manifest 945 android_manifest = _android_manifest
914 jar_path = _jar_path 946 jar_path = _jar_path
915 java_files = _java_files 947 java_files = _java_files
916 } 948 }
949
950 _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
951 findbugs("${_template_name}__findbugs") {
952 build_config = _build_config
953 jar_path = _jar_path
954 }
917 } 955 }
918 956
919 _final_deps += [ ":${_template_name}__dex" ] 957 _final_deps += [ ":${_template_name}__dex" ]
920 dex("${_template_name}__dex") { 958 dex("${_template_name}__dex") {
921 sources = [ 959 sources = [
922 _jar_path, 960 _jar_path,
923 ] 961 ]
924 output = _dex_path 962 output = _dex_path
925 } 963 }
926 } 964 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 ] 1130 ]
1093 output = invoker.dex_path 1131 output = invoker.dex_path
1094 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" 1132 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files"
1095 args = [ "--inputs=@FileArg($dex_arg_key)" ] 1133 args = [ "--inputs=@FileArg($dex_arg_key)" ]
1096 if (defined(invoker.excluded_jars)) { 1134 if (defined(invoker.excluded_jars)) {
1097 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) 1135 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir)
1098 args += [ "--excluded-paths=${excluded_jars}" ] 1136 args += [ "--excluded-paths=${excluded_jars}" ]
1099 } 1137 }
1100 } 1138 }
1101 } 1139 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698