Skip to content

Commit

Permalink
Default chromium_code = false for Android targets within third_party
Browse files Browse the repository at this point in the history
This affects the following:
  //third_party/jmake:jmake
  //third_party/jsr-305:jsr_305_javalib
  //third_party/gif_player:gif_player_java
  //third_party/leakcanary:leakcanary_noop_java

BUG=621774
TBR=yusufo

Review-Url: https://codereview.chromium.org/2103273002
Cr-Commit-Position: refs/heads/master@{#402926}
  • Loading branch information
agrieve authored and Commit bot committed Jun 29, 2016
1 parent 2c0f0b1 commit d08fe28
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 17 additions & 1 deletion build/config/android/internal_rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -1983,9 +1983,25 @@ if (enable_java_templates) {

# Don't enable coverage, lint, findbugs unless the target has some
# non-generated files.
_chromium_code = defined(invoker.java_files) && invoker.java_files != []
if (defined(invoker.chromium_code)) {
_chromium_code = invoker.chromium_code
} else {
_chromium_code = defined(invoker.java_files) && invoker.java_files != []
if (_chromium_code) {
# Make chromium_code = false be the default for targets within
# third_party which contain no chromium-namespaced java files.
set_sources_assignment_filter([ "*\bthird_party\b*" ])
sources = [
get_label_info(":$target_name", "dir"),
]
if (sources == []) {
set_sources_assignment_filter([ "*\bchromium\b*" ])
sources = invoker.java_files
_chromium_code = invoker.java_files != sources
}
set_sources_assignment_filter([])
sources = []
}
}

_emma_never_instrument = !_chromium_code
Expand Down
2 changes: 2 additions & 0 deletions third_party/custom_tabs_client/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ android_library("custom_tabs_client_shared_lib") {
deps = [
":custom_tabs_support_lib",
]
chromium_code = true
}

android_library("custom_tabs_support_lib") {
Expand All @@ -54,6 +55,7 @@ android_library("custom_tabs_support_lib") {
"//third_party/android_tools:android_support_v13_java",
]
srcjar_deps = [ ":chrome_custom_tabs_service_aidl" ]
chromium_code = true
}

android_aidl("chrome_custom_tabs_service_aidl") {
Expand Down

0 comments on commit d08fe28

Please sign in to comment.