aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-02-23 17:39:16 +0000
committerGravatar Irina Iancu <elenairina@google.com>2017-02-24 08:29:39 +0000
commit4ae1f5df4a8e182763b1d01ed6c99b7232008b4c (patch)
tree5dcff0367a24be3ca6a7bdfc1d7829254cfbaf9c /src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
parentbb4615c2fabe20121ed8ef5dd786cbf4d5f7c7d4 (diff)
Filter android_binary resources during analysis
Before this change, resource_configuration_filters were only used to filter resources out of android_binary targets during resource processing. Instead, we can filter these unwanted resources out during analysis. This means we won't have to copy these resources for use in execution, and that execution itself will have a smaller set of inputs. This should produce a speed-up in android_binary targets with resource_configuration_filters. Also add a flag that controls this behavior. Currently, the flag defaults to not doing this prefiltering. We'll change that after further testing. Also, do some related cleanup: - Replace repeated used of the constant "resource_configuration_filters" with references to the new class - Pass around instances of the new class rather that List<String> objects meant to represent ResourceConfigurationFilters -- PiperOrigin-RevId: 148353501 MOS_MIGRATED_REVID=148353501
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
index 529fe37ac3..a3ab7878b9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
@@ -84,7 +84,7 @@ public abstract class AndroidLibrary implements RuleConfiguredTargetFactory {
ResourceDependencies.fromRuleDeps(ruleContext, JavaCommon.isNeverLink(ruleContext)),
ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_R_TXT),
ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_SYMBOLS),
- ImmutableList.<String>of(), /* configurationFilters */
+ ResourceConfigurationFilter.empty(ruleContext),
ImmutableList.<String>of(), /* uncompressedExtensions */
false, /* crunchPng */
ImmutableList.<String>of(), /* densities */