Skip to content

Commit

Permalink
Make android lint suppressions file overridable.
Browse files Browse the repository at this point in the history
This makes possible for other projects to use their own lint suppressions file.
WebRTC for example, uses its own lint suppressions file.

BUG=

Review-Url: https://codereview.chromium.org/2290323002
Cr-Commit-Position: refs/heads/master@{#415304}
  • Loading branch information
ehmaldonado authored and Commit bot committed Aug 30, 2016
1 parent 8f00eb0 commit 72d0476
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build/config/android/internal_rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build_overrides/build.gni")
import("//build/config/android/config.gni")
import("//build/config/sanitizers/sanitizers.gni")

Expand Down Expand Up @@ -648,10 +649,15 @@ if (enable_java_templates) {
if (!defined(deps)) {
deps = []
}

if (!defined(lint_suppressions_file)) {
lint_suppressions_file = "//build/android/lint/suppressions.xml"
}

_cache_dir = "$root_build_dir/android_lint_cache"
_result_path = "$target_gen_dir/$target_name/result.xml"
_config_path = "$target_gen_dir/$target_name/config.xml"
_suppressions_file = "//build/android/lint/suppressions.xml"
_suppressions_file = lint_suppressions_file
_platform_xml_path =
"${android_sdk_root}/platform-tools/api/api-versions.xml"
_rebased_lint_android_sdk_root =
Expand Down
3 changes: 3 additions & 0 deletions build_overrides/build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ enable_java_templates = true
asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc"
lsan_suppressions_file = "//build/sanitizers/lsan_suppressions.cc"
tsan_suppressions_file = "//build/sanitizers/tsan_suppressions.cc"

# Uncomment these to specify a different lint suppressions file for android
# lint_suppressions_file = path/to/your/suppressions/file/suppressions.xml

0 comments on commit 72d0476

Please sign in to comment.