aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-03-30 17:10:33 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2017-03-31 17:09:12 +0200
commit29bd56e3cd3eadd63abcc833c3075ecedfd2e9dc (patch)
treee1d84f7539a238d25d70c758c52bc58b7038622d /src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
parent1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b (diff)
Remove RuleContext from ResourceFilter state
The RuleContext object is not available when creating dynamic configuration transitions. Removing it from ResourceFilter's state allows us to work with ResourceFilter objects while creating those transitions. If we didn't do this, we'd need to seperate the rest of ResourceFilter's state into a seperate class so that we could work with it as part of doing dynamic configurations. In the next reviews, I'll start actually creating dynamic configurations based on ResourceFilter state. Also, create a withAttrsFrom method that can be used in dynamic configuration transitions, and generally migrate methods that work with attributes from RuleContext to AttributeMap when practical. To support these changes: No longer keep the parsed lists of FolderConfiguration and Density objects as fields of the ResourceFilter, instead, write functions that get them when needed. We want to have access to a RuleContext when we initialize them to avoid errors, and we don't have one in the withAttrsFrom method which will be called as part of transitioning with dynamic configurations. We no longer have those parsed lists to represent whether the object filters during execution or analysis, so replace them with a seperate enum field for filter behavior. Include a FILTER_IN_ANALYSIS_WITH_DYNAMIC_CONFIGURATION option, even though it won't fully be used until the dynamic configuration transition is taken advantage of in the next few reviews. RELNOTES: none PiperOrigin-RevId: 151715400
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
index 5cdedf9828..34b5cbbb08 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
@@ -1115,7 +1115,7 @@ public class AndroidBinaryTest extends AndroidBuildViewTestCase {
badQualifier,
"android_binary(name = 'r',",
" manifest = 'AndroidManifest.xml',",
- " resource_files = glob(['res/**']),",
+ " resource_files = ['res/values/foo.xml'],",
" resource_configuration_filters = ['" + badQualifier + "'])");
}