Commit 9e811832 authored by Yngve N. Pettersen's avatar Yngve N. Pettersen Committed by Commit Bot

Forward GN variable lint_baseline_file if specified for a

chrome_public_apk_or_module_tmpl template instantiation for an Android
target

Additionally, add default values for lint_suppressions_file and
lint_baseline_file inside the chrome_public_common_apk_or_module_tmpl
template definition when linting is enabled.

Change-Id: I2feb9c0b26c133588495c523284b4ef7e9df5120
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391077
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804930}
parent a04b329e
...@@ -1942,6 +1942,7 @@ template("chrome_public_apk_or_module_tmpl") { ...@@ -1942,6 +1942,7 @@ template("chrome_public_apk_or_module_tmpl") {
"target_type", "target_type",
"enable_lint", "enable_lint",
"enable_multidex", "enable_multidex",
"lint_baseline_file",
"lint_suppressions_dep", "lint_suppressions_dep",
"lint_suppressions_file", "lint_suppressions_file",
]) ])
......
...@@ -369,6 +369,18 @@ template("chrome_public_common_apk_or_module_tmpl") { ...@@ -369,6 +369,18 @@ template("chrome_public_common_apk_or_module_tmpl") {
deps += [ "//chrome/android:chrome_all_java" ] deps += [ "//chrome/android:chrome_all_java" ]
# Use a consistent baseline so that it is easy to regenerate by deleting the
# file and re-building the "android_lint" target.
if (defined(enable_lint) && enable_lint) {
if (!defined(lint_baseline_file)) {
lint_baseline_file = "//chrome/android/expectations/lint-baseline.xml"
}
if (!defined(lint_suppressions_file)) {
lint_suppressions_file =
"//chrome/android/expectations/lint-suppressions.xml"
}
}
# Prefer to add this data_dep on the final target instead of java targets # Prefer to add this data_dep on the final target instead of java targets
# like chrome_all_java so that all other targets can build in parallel with # like chrome_all_java so that all other targets can build in parallel with
# lint. # lint.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment