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

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

Issue 1876823003: 🏡 Stop including android lint results in runtime_deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | 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 140bd4854f95e2a6af309beb7354259f139a070a..dbe0c90f3cf924a21765871f393741184db4e841 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -1590,10 +1590,6 @@ template("java_library_impl") {
_template_name = target_name
_final_deps = []
- _final_datadeps = []
- if (defined(invoker.datadeps)) {
- _final_datadeps = invoker.datadeps
- }
_supports_android =
defined(invoker.supports_android) && invoker.supports_android
@@ -1727,9 +1723,10 @@ template("java_library_impl") {
}
}
+ _has_lint_target = false
if (_supports_android) {
if (_chromium_code) {
- _final_datadeps += [ ":${_template_name}__lint" ]
+ _has_lint_target = true
android_lint("${_template_name}__lint") {
android_manifest = _android_manifest
build_config = _build_config
@@ -1742,13 +1739,24 @@ template("java_library_impl") {
}
if (_run_findbugs) {
- _final_datadeps += [ ":${_template_name}__findbugs" ]
findbugs("${_template_name}__findbugs") {
build_config = _build_config
jar_path = _jar_path
deps = build_config_deps + [ ":$_compile_java_target" ]
}
}
+
+ # Use an intermediate group() rather as the data_deps target in order to
+ # avoid lint artifacts showing up as runtime_deps (while still having lint
+ # run in parallel to other targets).
+ group("${_template_name}__analysis") {
+ public_deps = [
+ ":${_template_name}__lint",
+ ]
+ if (_run_findbugs) {
+ public_deps += [ ":${_template_name}__findbugs" ]
+ }
+ }
}
_final_deps += [ ":${_template_name}__dex" ]
@@ -1764,9 +1772,16 @@ template("java_library_impl") {
}
group(target_name) {
- forward_variables_from(invoker, [ "visibility" ])
+ data_deps = []
+ forward_variables_from(invoker,
+ [
+ "data_deps",
+ "visibility",
+ ])
public_deps = _final_deps
- data_deps = _final_datadeps
+ if (_has_lint_target) {
+ data_deps += [ ":${_template_name}__analysis" ]
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698