aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/extra
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-06-15 19:41:08 +0200
committerGravatar Yun Peng <pcloudy@google.com>2017-06-16 09:27:07 +0200
commit55f09409585afbee1889cebe1ec4d039c39681f4 (patch)
treee4791c5b6bc37481fc1e52cb420986e8eb35d402 /src/main/java/com/google/devtools/build/lib/rules/extra
parent9cadd78bce65f9b2fbcc22c2db1be2fc83bcc797 (diff)
Fix resource filtering bug in interaction between densities and API version
ResourceFilter, following Aapt's behavior, ignored the 'version' qualifier. However, ResourceFilter also filters by densities, which is not supposed to ignore the version qualifier. Change ResourceFilter to only ignore the version qualifier when filtering by resource_configuration_filters, not densities. Without this change, when filtering by density, ResourceFilter would treat, for example, res-hdpi-v4/foo.png and res-hdpi-v11/foo.png as identical, even though they have different versions, and only use one of them when building the newly filtered list of resources. Instead, they should both be included. Also include a unit test that covers this behavior. Rather than add this in AndroidBinaryTest, create a new ResourceFilterTest class. To support that, move ResourceFilter from using the test-unfriendly RuleContext class to the easy-to-fake RuleErrorConsumer whenever possible. RELNOTES: none PiperOrigin-RevId: 159122507
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/extra')
0 files changed, 0 insertions, 0 deletions